]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make native PKCS#11 require dlopen() support
authorMichał Kępień <michal@isc.org>
Mon, 28 Sep 2020 07:21:59 +0000 (09:21 +0200)
committerMichał Kępień <michal@isc.org>
Mon, 28 Sep 2020 07:24:48 +0000 (09:24 +0200)
PKCS#11 support in BIND requires dlopen() support from the operating
system and thus building with "--enable-native-pkcs11 --without-dlopen"
should not be possible.  Add an Autoconf check which enforces that
constraint.  Adjust the pairwise testing model accordingly.

(cherry picked from commit 187dca9cf7e3b7473352a7bd416abbc5c6f64cd4)

configure
configure.ac

index 887787faefb3070de200b8bfc90e23ef35e3424d..50b0fb27702219c89c7c9bf4ef589f3c6d1e213b 100755 (executable)
--- a/configure
+++ b/configure
 
 fi
 
+if test "$with_dlopen" = "no" -a "$want_native_pkcs11" = "yes"; then :
+  as_fn_error $? "PKCS11 requires dlopen() support" "$LINENO" 5
+fi
+
 CFLAGS="$CFLAGS $SO_CFLAGS"
 
 
index bdfd4d3f1aa967af378f54c3ac634780e0fa577d..30bd71b957f2c4673171ffe1a063acfc0e11c0df 100644 (file)
@@ -1489,7 +1489,7 @@ AC_SUBST(INSTALL_LIBRARY)
 # was --enable-native-pkcs11 specified?
 #  (note it implies both --without-openssl and --with-pkcs11)
 #
-# [pairwise: --enable-native-pkcs11, --disable-native-pkcs11]
+# [pairwise: --enable-native-pkcs11 --with-dlopen, --disable-native-pkcs11 --with-dlopen, --disable-native-pkcs11 --without-dlopen]
 AC_ARG_ENABLE(native-pkcs11,
              AS_HELP_STRING([--enable-native-pkcs11],
                             [use native PKCS11 for all crypto [default=no]]),
@@ -5151,7 +5151,7 @@ SO_LD=""
 SO_TARGETS=""
 SO_STRIP="cat"
 
-# [pairwise: --with-dlopen, --without-dlopen]
+# [pairwise: skip]
 AC_ARG_WITH([dlopen],
            AS_HELP_STRING([--with-dlopen=ARG],
                           [support dynamically loadable DLZ drivers]),
@@ -5245,6 +5245,9 @@ AS_IF([test "$with_dlopen" = "yes"],
             ])
       ])
 
+AS_IF([test "$with_dlopen" = "no" -a "$want_native_pkcs11" = "yes"],
+      [AC_MSG_ERROR([PKCS11 requires dlopen() support])])
+
 CFLAGS="$CFLAGS $SO_CFLAGS"
 
 AC_SUBST(SO)