]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_10] register pkcs11 error codes in dig
authorEvan Hunt <each@isc.org>
Fri, 22 Aug 2014 17:41:43 +0000 (10:41 -0700)
committerEvan Hunt <each@isc.org>
Fri, 22 Aug 2014 17:41:43 +0000 (10:41 -0700)
3927. [bug] dig: report PKCS#11 error codes correctly when
compiled with --enable-native-pkcs11. [RT #36956]

(cherry picked from commit 24aaa0440116357eef3ab3796ebe53318b03b1ec)

CHANGES
bin/dig/Makefile.in
bin/dig/dighost.c

diff --git a/CHANGES b/CHANGES
index c1b95319a809760414a3a8c5406643ba81f34108..7d9e898a04399146c3b6131a323330f8cf25eb9f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3927.  [bug]           dig: report PKCS#11 error codes correctly when
+                       compiled with --enable-native-pkcs11. [RT #36956]
+
 3926.  [doc]           Added doc for geoip-directory. [RT #36877]
 
 3925.  [bug]           DS lookup of RFC 1918 empty zones failed. [RT #36917]
index 23dd283940b129c16ee2bad4b6867e6d2284ebc7..730f1b57efa93f01fa043e4127af78cb59eb8226 100644 (file)
@@ -28,7 +28,7 @@ READLINE_LIB = @READLINE_LIB@
 CINCLUDES =    -I${srcdir}/include ${DNS_INCLUDES} ${BIND9_INCLUDES} \
                ${ISC_INCLUDES} ${LWRES_INCLUDES} ${ISCCFG_INCLUDES}
 
-CDEFINES =     -DVERSION=\"${VERSION}\"
+CDEFINES =     -DVERSION=\"${VERSION}\" @CRYPTO@
 CWARNINGS =
 
 ISCCFGLIBS =   ../../lib/isccfg/libisccfg.@A@
index ba1a30c56f742e07d7fc514f0c8ad836f50f3d85..a44f2402346451e52a57ff3e4ddd64407441e2d8 100644 (file)
 
 #include <dig/dig.h>
 
+#ifdef PKCS11CRYPTO
+#include <pk11/result.h>
+#endif
+
 #if ! defined(NS_INADDRSZ)
 #define NS_INADDRSZ     4
 #endif
@@ -1415,6 +1419,11 @@ setup_libs(void) {
 
        debug("setup_libs()");
 
+#ifdef PKCS11CRYPTO
+       pk11_result_register();
+#endif
+       dns_result_register();
+
        result = isc_net_probeipv4();
        if (result == ISC_R_SUCCESS)
                have_ipv4 = ISC_TRUE;
@@ -1473,8 +1482,6 @@ setup_libs(void) {
 
        result = isc_mutex_init(&lookup_lock);
        check_result(result, "isc_mutex_init");
-
-       dns_result_register();
 }
 
 /*%