diff --git a/bin/pkcs11/pkcs11-destroy.c b/bin/pkcs11/pkcs11-destroy.c index 21c322222f..cbc4d9692a 100644 --- a/bin/pkcs11/pkcs11-destroy.c +++ b/bin/pkcs11/pkcs11-destroy.c @@ -40,6 +40,11 @@ main(int argc, char *argv[]) }; extern char *optarg; extern int optopt; + char *pk11_provider; + + pk11_provider = getenv("PKCS11_PROVIDER"); + if (pk11_provider != NULL) + pk11_libname = pk11_provider; while ((c = getopt(argc, argv, ":m:s:i:l:p:")) != -1) { switch (c) { diff --git a/bin/pkcs11/pkcs11-keygen.c b/bin/pkcs11/pkcs11-keygen.c index df25556c4c..13c4669d9b 100644 --- a/bin/pkcs11/pkcs11-keygen.c +++ b/bin/pkcs11/pkcs11-keygen.c @@ -80,6 +80,11 @@ main(int argc, char *argv[]) CK_ULONG privatekey_attrcnt = 7; extern char *optarg; extern int optopt; + char *pk11_provider; + + pk11_provider = getenv("PKCS11_PROVIDER"); + if (pk11_provider != NULL) + pk11_libname = pk11_provider; while ((c = getopt(argc, argv, ":Pm:s:b:ei:l:p:")) != -1) { switch (c) { diff --git a/bin/pkcs11/pkcs11-list.c b/bin/pkcs11/pkcs11-list.c index 094664e6c4..50c6cbdaca 100644 --- a/bin/pkcs11/pkcs11-list.c +++ b/bin/pkcs11/pkcs11-list.c @@ -39,6 +39,11 @@ main(int argc, char *argv[]) }; extern char *optarg; extern int optopt; + char *pk11_provider; + + pk11_provider = getenv("PKCS11_PROVIDER"); + if (pk11_provider != NULL) + pk11_libname = pk11_provider; while ((c = getopt(argc, argv, ":m:s:i:l:p:P")) != -1) { switch (c) { diff --git a/configure.in b/configure.in index 81ccd963df..27e0d87524 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.482 $) +AC_REVISION($Revision: 1.483 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.59) @@ -718,29 +718,29 @@ case "$use_pkcs11" in no|'') AC_MSG_RESULT(disabled) USE_PKCS11='' + PKCS11_TOOLS='' ;; yes|*) AC_MSG_RESULT(using OpenSSL with PKCS11 support) USE_PKCS11='-DUSE_PKCS11' + PKCS11_TOOLS=pkcs11 ;; esac AC_SUBST(USE_PKCS11) +AC_SUBST(PKCS11_TOOLS) AC_MSG_CHECKING(for PKCS11 tools) case "$use_pkcs11" in no|yes|'') AC_MSG_RESULT(disabled) PKCS11_PROVIDER="undefined" - PKCS11_TOOLS='' ;; *) AC_MSG_RESULT(PKCS11 provider is "$use_pkcs11") PKCS11_PROVIDER="$use_pkcs11" - PKCS11_TOOLS=pkcs11 ;; esac AC_SUBST(PKCS11_PROVIDER) -AC_SUBST(PKCS11_TOOLS) AC_MSG_CHECKING(for GSSAPI library) AC_ARG_WITH(gssapi,