Show
Ignore:
Timestamp:
03/06/08 16:06:59 (10 months ago)
Author:
alonbl
Message:

Complete rewrite of OpenSC build system.

1. Build system now supports MinGW (Windows) compilation using msys and cross compilation.
2. Ability to explicitly disable and enable dependencies of the package.
3. openct, pcsc and nsplugins features are disabled by default.
4. Modified pcsc driver to use pcsc dynamically, no compile time dependency is required.
5. --enable-pcsc-lite configuration option renamed to --enable-pcsc.
6. Install opensc.conf file (as opensc.conf.new if opensc.conf exists).
7. Add--enable-doc configuration option, allow installing documentation into target.
8. Add --disable-man configuration option, allow msys mingw32 users to

build from svn without extra dependencies.

9. Add export files to each library in order to export only required symbols.

Windows native build may use these files instead of scanning objects' symbols.

10. Add opensc-tool --info to display some general information about the build.
11. Create compatibility library to be linked against library instread of recompiling the

same source files in different places.

12. Add different win32 version resource to each class of outputs.
13. Make xsl-stylesheets location selectable.
14. Some win32 fixups.
15. Some warning fixups.
16. Many other autoconf/automake cleanups.

Alon Bar-Lev

svn diff -r 3315:3399 https://www.opensc-project.org/svn/opensc/branches/alonbl/mingw

_M .
D configure.in
_M src
_M src/openssh
M src/openssh/Makefile.am
_M src/tools
M src/tools/rutoken-tool.c
M src/tools/opensc-tool.c
M src/tools/cardos-info.c
M src/tools/pkcs15-crypt.c
M src/tools/pkcs15-init.c
M src/tools/piv-tool.c
M src/tools/netkey-tool.c
M src/tools/eidenv.c
M src/tools/cryptoflex-tool.c
M src/tools/util.c
M src/tools/pkcs11-tool.c
M src/tools/pkcs15-tool.c
M src/tools/util.h
M src/tools/opensc-explorer.c
M src/tools/Makefile.am
_M src/pkcs11
M src/pkcs11/pkcs11-global.c
M src/pkcs11/framework-pkcs15.c
M src/pkcs11/mechanism.c
M src/pkcs11/pkcs11-display.c
M src/pkcs11/pkcs11-object.c
A src/pkcs11/opensc-pkcs11.exports
M src/pkcs11/sc-pkcs11.h
M src/pkcs11/pkcs11-spy.c
M src/pkcs11/openssl.c
M src/pkcs11/Makefile.am
A src/pkcs11/pkcs11-spy.exports
_M src/tests
_M src/tests/regression
M src/tests/regression/Makefile.am
M src/tests/sc-test.c
M src/tests/pintest.c
M src/tests/Makefile.am
_M src/include
_M src/include/opensc
M src/include/opensc/Makefile.am
A src/include/opensc/svnignore
M src/include/Makefile.am
_M src/signer
_M src/signer/npinclude
M src/signer/npinclude/Makefile.am
M src/signer/Makefile.am
A src/signer/signer.exports
_M src/common
A src/common/compat_dummy.c
D src/common/getopt.txt
D src/common/strlcpy.c
D src/common/LICENSE
A src/common/compat_getopt.txt
A src/common/compat_strlcpy.c
A src/common/LICENSE.compat_getopt
A src/common/compat_getopt.c
D src/common/strlcpy.h
D src/common/ChangeLog
D src/common/getpass.c
D src/common/my_getopt.c
A src/common/compat_strlcpy.h
A src/common/compat_getpass.c
A src/common/compat_getopt.h
A src/common/ChangeLog.compat_getopt
D src/common/README.strlcpy
D src/common/my_getopt.h
A src/common/compat_getpass.h
A src/common/README.compat_strlcpy
D src/common/strlcpy.3
A src/common/README.compat_getopt
D src/common/getopt.3
D src/common/README.my_getopt
A src/common/compat_strlcpy.3
A src/common/compat_getopt.3
M src/common/Makefile.am
M src/Makefile.am
_M src/pkcs15init
M src/pkcs15init/pkcs15-oberthur.c
M src/pkcs15init/profile.c
M src/pkcs15init/pkcs15-lib.c
M src/pkcs15init/pkcs15-rutoken.c
A src/pkcs15init/pkcs15init.exports
M src/pkcs15init/pkcs15-gpk.c
M src/pkcs15init/Makefile.am
_M src/scconf
M src/scconf/Makefile.am
M src/scconf/parse.c
A src/scconf/scconf.exports
_M src/libopensc
M src/libopensc/card-rutoken.c
M src/libopensc/compression.c
M src/libopensc/sc.c
M src/libopensc/card-piv.c
M src/libopensc/pkcs15-openpgp.c
M src/libopensc/pkcs15-postecert.c
M src/libopensc/pkcs15-tcos.c
M src/libopensc/opensc-config.in
M src/libopensc/reader-pcsc.c
A src/libopensc/internal-winscard.h
M src/libopensc/ctx.c
A src/libopensc/libopensc.exports
M src/libopensc/pkcs15-piv.c
M src/libopensc/pkcs15-infocamere.c
M src/libopensc/internal.h
M src/libopensc/pkcs15-actalis.c
M src/libopensc/pkcs15-starcert.c
M src/libopensc/card-oberthur.c
M src/libopensc/pkcs15-atrust-acos.c
M src/libopensc/p15card-helper.c
D src/libopensc/part10.h
M src/libopensc/ui.c
M src/libopensc/card-gpk.c
M src/libopensc/pkcs15-wrap.c
M src/libopensc/pkcs15-gemsafeGPK.c
M src/libopensc/log.c
M src/libopensc/pkcs15-esteid.c
M src/libopensc/pkcs15-prkey-rutoken.c
M src/libopensc/log.h
M src/libopensc/Makefile.am
M src/libopensc/reader-openct.c
_M aclocal
M aclocal/Makefile.am
_M win32
M win32/Makefile.am
A win32/versioninfo.rc.in
A win32/ltrc.inc
A configure.ac
_M doc
_M doc/tools
M doc/tools/pkcs15-profile.xml
D doc/changelog.sh
D doc/export-wiki.xsl
_M doc/api
_M doc/api/file
M doc/api/man.xsl
_M doc/api/asn1
_M doc/api/apps
_M doc/api/init
_M doc/api/types
_M doc/api/card
M doc/api/html.xsl
_M doc/api/misc
_M doc/api/util
M doc/Makefile.am
D doc/export-wiki.sh
AM doc/nonpersistent
A doc/nonpersistent/export-wiki.xsl
A doc/nonpersistent/Makefile.am
A doc/nonpersistent/export-wiki.sh
A doc/nonpersistent/svn2cl.xsl
D doc/generate-man.sh
D doc/svn2cl.xsl
M Makefile.am
A svnignore
_M etc
M etc/opensc.conf.in
M etc/Makefile.am
D man
_M solaris
M solaris/Makefile

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
        26 archive 
        27 acinclude.m4 
        28 aclocal.m4 
        29 autom4te.cache 
        30 compile 
        31 confdefs.h 
        32 config.cache 
        33 config.guess 
        34 config.h 
        35 config.h.in 
        36 config.log 
        37 config.status 
        38 config.sub 
        39 configure 
        40 conftest 
        41 conftest.c 
        42 depcomp 
        43 install-sh 
        44 libtool 
        45 libtool.m4 
        46 ltmain.sh 
        47 missing 
        48 mkinstalldirs 
        49 so_locations 
        50 stamp-h* 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54 
         55ChangeLog 
         56opensc.conf 
         57xsl-stylesheets 
         58opensc-config 
         59test-conf 
         60pkcs15-tool 
         61pkcs15-crypt 
         62pkcs15-init 
         63piv-tool 
         64eidenv 
         65opensc-explorer 
         66opensc-tool 
         67rutoken-tool 
         68cardos-info 
         69cryptoflex-tool 
         70netkey-tool 
         71pkcs11-tool 
         72pintest 
         73p15dump 
         74prngtest 
         75base64 
         76lottery 
         77 
  • trunk/src

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54 
         55ChangeLog 
         56opensc.conf 
         57xsl-stylesheets 
         58opensc-config 
         59test-conf 
         60pkcs15-tool 
         61pkcs15-crypt 
         62pkcs15-init 
         63piv-tool 
         64eidenv 
         65opensc-explorer 
         66opensc-tool 
         67rutoken-tool 
         68cardos-info 
         69cryptoflex-tool 
         70netkey-tool 
         71pkcs11-tool 
         72pintest 
         73p15dump 
         74prngtest 
         75base64 
         76lottery 
         77 
  • trunk/src/tools

    • Property svn:ignore
      •  

        old new  
         1Makefile 
         2Makefile.in 
         3core 
         4archive 
         5acinclude.m4 
         6aclocal.m4 
         7autom4te.cache 
         8compile 
         9confdefs.h 
         10config.* 
         11configure 
         12conftest 
         13conftest.c 
         14depcomp 
         15install-sh 
         16libtool 
         17libtool.m4 
         18ltmain.sh 
         19missing 
         20mkinstalldirs 
         21so_locations 
         22stamp-h* 
         23 
        124.deps 
        225.libs 
         
        1942*.rej 
        2043*.u 
         44*.rc 
         45*.pc 
        2146*~ 
        22 Makefile 
        23 Makefile.in 
        24 core 
        25 gmon.out 
        26 cryptoflex-tool 
        27 cardos-info 
         47*.gz 
         48*.bz2 
         49*.[0-9] 
         50*.html 
         51*.gif 
         52*.css 
         53*.out 
         54 
         55ChangeLog 
         56opensc.conf 
         57xsl-stylesheets 
         58opensc-config 
         59test-conf 
         60pkcs15-tool 
         61pkcs15-crypt 
         62pkcs15-init 
         63piv-tool 
        2864eidenv 
        29 piv-tool 
        30 netkey-tool 
        3165opensc-explorer 
        3266opensc-tool 
         67rutoken-tool 
         68cardos-info 
         69cryptoflex-tool 
         70netkey-tool 
        3371pkcs11-tool 
        34 pkcs15-crypt 
        35 pkcs15-init 
        36 pkcs15-tool 
         72pintest 
         73p15dump 
         74prngtest 
         75base64 
         76lottery 
         77 
  • trunk/src/tools/pkcs15-init.c

    r3403 r3405  
    5353#include <opensc/ui.h> 
    5454#include <opensc/cards.h> 
     55#include <compat_getpass.h> 
    5556#include "util.h" 
    56 #include "strlcpy.h" 
     57#include <compat_strlcpy.h> 
    5758 
    5859 
     
    348349#ifdef RANDOM_POOL 
    349350        if (!RAND_load_file(RANDOM_POOL, 32)) 
    350                 fatal("Unable to seed random number pool for key generation"); 
     351                util_fatal("Unable to seed random number pool for key generation"); 
    351352#endif 
    352353 
     
    354355 
    355356        if (optind != argc) 
    356                 print_usage_and_die(app_name, options, option_help); 
     357                util_print_usage_and_die(app_name, options, option_help); 
    357358        if (opt_actions == 0) { 
    358359                fprintf(stderr, "No action specified.\n"); 
    359                 print_usage_and_die(app_name, options, option_help); 
     360                util_print_usage_and_die(app_name, options, option_help); 
    360361        } 
    361362        if (!opt_profile) { 
    362363                fprintf(stderr, "No profile specified.\n"); 
    363                 print_usage_and_die(app_name, options, option_help); 
     364                util_print_usage_and_die(app_name, options, option_help); 
    364365        } 
    365366 
     
    465466                        break; 
    466467                default: 
    467                         fatal("Action not yet implemented\n"); 
     468                        util_fatal("Action not yet implemented\n"); 
    468469                } 
    469470 
     
    502503        r = sc_context_create(&ctx, &ctx_param); 
    503504        if (r) { 
    504                 error("Failed to establish context: %s\n", sc_strerror(r)); 
     505                util_error("Failed to establish context: %s\n", sc_strerror(r)); 
    505506                return 0; 
    506507        } 
     
    510511        } 
    511512 
    512         if (connect_card(ctx, &card, reader, 0, opt_wait, verbose)) 
     513        if (util_connect_card(ctx, &card, reader, 0, opt_wait, verbose)) 
    513514                return 0; 
    514515 
     
    681682 
    682683        if (!pin_id) { 
    683                 error("No pin id specified\n"); 
     684                util_error("No pin id specified\n"); 
    684685                return SC_ERROR_INVALID_ARGUMENTS; 
    685686        } 
     
    693694        } 
    694695        if (*opt_pins[0] == '\0') { 
    695                 error("You must specify a PIN\n"); 
     696                util_error("You must specify a PIN\n"); 
    696697                return SC_ERROR_INVALID_ARGUMENTS; 
    697698        } 
     
    10031004                r = do_convert_cert(newcert_raw, newcert); 
    10041005        else 
    1005                 error("the public keys in the old and new certificate differ"); 
     1006                util_error("the public keys in the old and new certificate differ"); 
    10061007 
    10071008        X509_free(newcert); 
     
    10271028 
    10281029        if (opt_objectid == NULL) { 
    1029                 error("no ID given for the cert: use --id"); 
     1030                util_error("no ID given for the cert: use --id"); 
    10301031                return SC_ERROR_INVALID_ARGUMENTS; 
    10311032        } 
    10321033        sc_pkcs15_format_id(opt_objectid, &id); 
    10331034    if (sc_pkcs15_find_cert_by_id(p15card, &id, &obj) != 0) { 
    1034         error("Couldn't find the cert with ID %s\n", opt_objectid); 
     1035        util_error("Couldn't find the cert with ID %s\n", opt_objectid); 
    10351036        return SC_ERROR_OBJECT_NOT_FOUND; 
    10361037    } 
     
    12341235                sc_pkcs15_object_t *obj; 
    12351236                if (opt_application_id == NULL) 
    1236                         fatal("Specify the --application-id for the data object to be deleted\n"); 
     1237                        util_fatal("Specify the --application-id for the data object to be deleted\n"); 
    12371238                sc_format_oid(&app_oid, opt_application_id); 
    12381239 
     
    12481249                sc_pkcs15_id_t id; 
    12491250                if (opt_objectid == NULL) 
    1250                                 fatal("Specify the --id for key(s) or cert(s) to be deleted\n"); 
     1251                                util_fatal("Specify the --id for key(s) or cert(s) to be deleted\n"); 
    12511252                sc_pkcs15_format_id(opt_objectid, &id); 
    12521253 
     
    13421343                spec += 3; 
    13431344        } else { 
    1344                 error("Unknown algorithm \"%s\"", spec); 
     1345                util_error("Unknown algorithm \"%s\"", spec); 
    13451346                return SC_ERROR_INVALID_ARGUMENTS; 
    13461347        } 
     
    13531354                keybits = strtoul(spec, &end, 10); 
    13541355                if (*end) { 
    1355                         error("Invalid number of key bits \"%s\"", spec); 
     1356                        util_error("Invalid number of key bits \"%s\"", spec); 
    13561357                        return SC_ERROR_INVALID_ARGUMENTS; 
    13571358                } 
     
    14081409                sc_pkcs15_format_id(opt_authid, &args->auth_id); 
    14091410        } else if (!opt_unprotected) { 
    1410                 error("no PIN given for key - either use --insecure or \n" 
     1411                util_error("no PIN given for key - either use --insecure or \n" 
    14111412                      "specify a PIN using --auth-id"); 
    14121413                return SC_ERROR_INVALID_ARGUMENTS; 
     
    14181419                } else { 
    14191420                        if (!opt_unprotected) { 
    1420                                 error("no pass phrase given for key - " 
     1421                                util_error("no pass phrase given for key - " 
    14211422                                      "either use --insecure or\n" 
    14221423                                      "specify a pass phrase using " 
     
    14781479 
    14791480parse_err: 
    1480         fatal("Cannot parse secret \"%s\"\n", arg); 
     1481        util_fatal("Cannot parse secret \"%s\"\n", arg); 
    14811482} 
    14821483 
     
    17281729                        BIO_free(err); 
    17291730                        if (rsa == 0) 
    1730                                 fatal("RSA key generation error"); 
     1731                                util_fatal("RSA key generation error"); 
    17311732                        EVP_PKEY_assign_RSA(*res, rsa); 
    17321733                        break; 
     
    17421743                                r = DSA_generate_key(dsa); 
    17431744                        if (r == 0 || dsa == 0) 
    1744                                 fatal("DSA key generation error"); 
     1745                                util_fatal("DSA key generation error"); 
    17451746                        EVP_PKEY_assign_DSA(*res, dsa); 
    17461747                        break; 
    17471748                } 
    17481749        default: 
    1749                 fatal("Unable to generate key: unsupported algorithm"); 
     1750                util_fatal("Unable to generate key: unsupported algorithm"); 
    17501751        } 
    17511752        return 0; 
     
    17831784        bio = BIO_new(BIO_s_file()); 
    17841785        if (BIO_read_filename(bio, filename) <= 0) 
    1785                 fatal("Unable to open %s: %m", filename); 
     1786                util_fatal("Unable to open %s: %m", filename); 
    17861787        *key = PEM_read_bio_PrivateKey(bio, NULL, pass_cb, (char *) passphrase); 
    17871788        BIO_free(bio); 
     
    18081809        bio = BIO_new(BIO_s_file()); 
    18091810        if (BIO_read_filename(bio, filename) <= 0) 
    1810                 fatal("Unable to open %s: %m", filename); 
     1811                util_fatal("Unable to open %s: %m", filename); 
    18111812        p12 = d2i_PKCS12_bio(bio, NULL); 
    18121813        BIO_free(bio); 
     
    18171818 
    18181819        if (!user_key) { 
    1819                 error("No key in pkcs12 file?!\n"); 
     1820                util_error("No key in pkcs12 file?!\n"); 
    18201821                return SC_ERROR_CANNOT_LOAD_KEY; 
    18211822        } 
     
    18741875                } 
    18751876        } else { 
    1876                 error("Error when reading private key. " 
     1877                util_error("Error when reading private key. " 
    18771878                      "Key file format \"%s\" not supported.\n", format); 
    18781879                return SC_ERROR_NOT_SUPPORTED; 
     
    18801881 
    18811882        if (r < 0) 
    1882                 fatal("Unable to read private key from %s\n", filename); 
     1883                util_fatal("Unable to read private key from %s\n", filename); 
    18831884        return r; 
    18841885} 
     
    18951896        bio = BIO_new(BIO_s_file()); 
    18961897        if (BIO_read_filename(bio, filename) <= 0) 
    1897                 fatal("Unable to open %s: %m", filename); 
     1898                util_fatal("Unable to open %s: %m", filename); 
    18981899        pk = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL); 
    18991900        BIO_free(bio); 
     
    19111912        bio = BIO_new(BIO_s_file()); 
    19121913        if (BIO_read_filename(bio, filename) <= 0) 
    1913                 fatal("Unable to open %s: %m", filename); 
     1914                util_fatal("Unable to open %s: %m", filename); 
    19141915        pk = d2i_PUBKEY_bio(bio, NULL); 
    19151916        BIO_free(bio); 
     
    19271928                *out = do_read_der_public_key(name); 
    19281929        } else { 
    1929                 fatal("Error when reading public key. " 
     1930                util_fatal("Error when reading public key. " 
    19301931                      "File format \"%s\" not supported.\n", 
    19311932                      format); 
     
    19331934 
    19341935        if (!*out) 
    1935                 fatal("Unable to read public key from %s\n", name); 
     1936                util_fatal("Unable to read public key from %s\n", name); 
    19361937        return 0; 
    19371938} 
     
    19491950        bio = BIO_new(BIO_s_file()); 
    19501951        if (BIO_write_filename(bio, (char *) filename) < 0) 
    1951                 fatal("Unable to open %s: %m", filename); 
     1952                util_fatal("Unable to open %s: %m", filename); 
    19521953        r = PEM_write_bio_PUBKEY(bio, pk); 
    19531954        BIO_free(bio); 
     
    19871988        bio = BIO_new(BIO_s_file()); 
    19881989        if (BIO_read_filename(bio, filename) <= 0) 
    1989                 fatal("Unable to open %s: %m", filename); 
     1990                util_fatal("Unable to open %s: %m", filename); 
    19901991        xp = PEM_read_bio_X509(bio, NULL, NULL, NULL); 
    19911992        BIO_free(bio); 
     
    20032004        bio = BIO_new(BIO_s_file()); 
    20042005        if (BIO_read_filename(bio, filename) <= 0) 
    2005                 fatal("Unable to open %s: %m", filename); 
     2006                util_fatal("Unable to open %s: %m", filename); 
    20062007        xp = d2i_X509_bio(bio, NULL); 
    20072008        BIO_free(bio); 
     
    20192020                *out = do_read_der_certificate(name); 
    20202021        } else { 
    2021                 fatal("Error when reading certificate. " 
     2022                util_fatal("Error when reading certificate. " 
    20222023                      "File format \"%s\" not supported.\n", 
    20232024                      format); 
     
    20252026 
    20262027        if (!*out) 
    2027                 fatal("Unable to read certificate from %s\n", name); 
     2028                util_fatal("Unable to read certificate from %s\n", name); 
    20282029        return 0; 
    20292030} 
     
    20342035 
    20352036        if ((fp = fopen(filename,"rb")) == NULL) { 
    2036           fatal("Unable to open %s: %m", filename); 
     2037          util_fatal("Unable to open %s: %m", filename); 
    20372038          } 
    20382039        fseek(fp,0L,SEEK_END); 
     
    20942095                 || !do_convert_bignum(&dst->p, src->p) 
    20952096                 || !do_convert_bignum(&dst->q, src->q)) 
    2096                         fatal("Invalid/incomplete RSA key.\n"); 
     2097                        util_fatal("Invalid/incomplete RSA key.\n"); 
    20972098                if (src->iqmp && src->dmp1 && src->dmq1) { 
    20982099                        do_convert_bignum(&dst->iqmp, src->iqmp); 
     
    21172118                } 
    21182119        default: 
    2119                 fatal("Unsupported key algorithm\n"); 
     2120                util_fatal("Unsupported key algorithm\n"); 
    21202121        } 
    21212122 
     
    21332134                if (!do_convert_bignum(&dst->modulus, src->n) 
    21342135                 || !do_convert_bignum(&dst->exponent, src->e)) 
    2135                         fatal("Invalid/incomplete RSA key.\n"); 
     2136                        util_fatal("Invalid/incomplete RSA key.\n"); 
    21362137                RSA_free(src); 
    21372138                break; 
     
    21502151                } 
    21512152        default: 
    2152                 fatal("Unsupported key algorithm\n"); 
     2153                util_fatal("Unsupported key algorithm\n"); 
    21532154        } 
    21542155 
     
    22382239                r = sc_pkcs15_find_pin_by_auth_id(p15card, &auth_id, &pinobj); 
    22392240                if (r < 0) 
    2240                         fatal("Searching for user PIN %d failed: %s\n", opt_authid, sc_strerror(r)); 
     2241                        util_fatal("Searching for user PIN %d failed: %s\n", opt_authid, sc_strerror(r)); 
    22412242                pin_info = (sc_pkcs15_pin_info_t *) pinobj->data; 
    22422243                sc_keycache_set_pin_name(&path, pin_info->reference, SC_PKCS15INIT_USER_PIN); 
     
    23762377                break; 
    23772378        case 'h': 
    2378                 print_usage_and_die(app_name, options, option_help); 
     2379                util_print_usage_and_die(app_name, options, option_help); 
    23792380        case 'i': 
    23802381                opt_objectid = optarg; 
     
    24652466                break; 
    24662467        default: 
    2467                 print_usage_and_die(app_name, options, option_help); 
     2468                util_print_usage_and_die(app_name, options, option_help); 
    24682469        } 
    24692470 
     
    24752476                        fprintf(stderr, " -%c", opt->val); 
    24762477                fprintf(stderr, " more than once.\n"); 
    2477                 print_usage_and_die(app_name, options, option_help); 
     2478                util_print_usage_and_die(app_name, options, option_help); 
    24782479        } 
    24792480        if (this_action) 
     
    24842485                "The --no-so-pin option and --so-pin/--so-puk are mutually\n" 
    24852486                "exclusive.\n"); 
    2486                 print_usage_and_die(app_name, options, option_help); 
     2487                util_print_usage_and_die(app_name, options, option_help); 
    24872488        } 
    24882489} 
     
    25122513                        break; 
    25132514                default: 
    2514                         fatal("Internal: bad has_arg value"); 
     2515                        util_fatal("Internal: bad has_arg value");