]> 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:21:59 +0000 (09:21 +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.

configure
configure.ac

index deb7f36a75e84ba2fce11280adcfc612b35bf552..c9a2ff4b5ee301db7a8fc156723097202b67795f 100755 (executable)
--- a/configure
+++ b/configure
 
 fi
 
+if test "$with_dlopen" = "no" -a "$enable_native_pkcs11" = "yes"; then :
+  as_fn_error $? "PKCS11 requires dlopen() support" "$LINENO" 5
+fi
+
 CFLAGS="$CFLAGS $SO_CFLAGS"
 
 
index 4aaae5b0486b1d5aac35e7094afc4246a3d87a18..296824f98b32733056e1d185c40570480b81577b 100644 (file)
@@ -904,7 +904,7 @@ PKCS11_MANS=
 #
 # was --enable-native-pkcs11 specified?
 #
-# [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 public-key crypto [default=no]]),
@@ -2451,7 +2451,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 and DYNDB drivers]),
@@ -2542,6 +2542,9 @@ AS_IF([test "$with_dlopen" = "yes"],
             ])
       ])
 
+AS_IF([test "$with_dlopen" = "no" -a "$enable_native_pkcs11" = "yes"],
+      [AC_MSG_ERROR([PKCS11 requires dlopen() support])])
+
 CFLAGS="$CFLAGS $SO_CFLAGS"
 
 AC_SUBST(SO)