]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
- build pkcs11 tools when compiling --with-pkcs11=yes
authorEvan Hunt <each@isc.org>
Tue, 6 Oct 2009 20:27:55 +0000 (20:27 +0000)
committerEvan Hunt <each@isc.org>
Tue, 6 Oct 2009 20:27:55 +0000 (20:27 +0000)
- add PKCS11_PROVIDER environment variable as a method for specifying
  the provider.

bin/pkcs11/pkcs11-destroy.c
bin/pkcs11/pkcs11-keygen.c
bin/pkcs11/pkcs11-list.c
configure.in

index 21c322222f1e0eff9d90539c31c7802eef6110c6..cbc4d9692a8537417b871d4a375f45e387e86ec5 100644 (file)
@@ -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) {
index df25556c4ca66dd184c11588f57aa2b9bc2354a5..13c4669d9bc33c37d3a81292c089b79b05bd42b7 100644 (file)
@@ -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) {
index 094664e6c4ac2b5a5c9d19423773762f3c2ab63c..50c6cbdaca27c9bff22412876f238621ce675818 100644 (file)
@@ -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) {
index 81ccd963dfd28d874780a013d4dcedc51aeeb746..27e0d8752490070ba6240e8e86bcbdee598b7bab 100644 (file)
@@ -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,