From b9cf39867933ed42578b7c21bf3760b7767e21c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Mon, 28 Sep 2020 09:30:00 +0200 Subject: [PATCH] Disable OpenSSL hashing when using native PKCS#11 When building with "--enable-native-pkcs11 --with-openssl", OpenSSL support is automatically disabled in favor of native PKCS#11: checking for OpenSSL library... use of native PKCS11 instead However, adding "--enable-openssl-hash" to the above two switches causes the build to fail: checking for OpenSSL library... use of native PKCS11 instead disabled because of native PKCS11 checking for using OpenSSL for hash functions... configure: error: No OpenSSL for hash functions In other words, "--with-openssl" and "--enable-openssl-hash" are not behaving consistently when used together with "--enable-native-pkcs11". Fix by automatically disabling OpenSSL hashing support when native PKCS#11 support is enabled. --- configure | 1 + configure.ac | 1 + 2 files changed, 2 insertions(+) diff --git a/configure b/configure index 50b0fb2770..87a30f1093 100755 --- a/configure +++ b/configure @@ -17101,6 +17101,7 @@ openssldirs="/usr /usr/local /usr/local/ssl /opt/local /usr/pkg /usr/sfw" if test "yes" = "$want_native_pkcs11" then use_openssl="native_pkcs11" + want_openssl_hash="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use of native PKCS11 instead" >&5 $as_echo "use of native PKCS11 instead" >&6; } fi diff --git a/configure.ac b/configure.ac index 30bd71b957..b743f3e205 100644 --- a/configure.ac +++ b/configure.ac @@ -1557,6 +1557,7 @@ openssldirs="/usr /usr/local /usr/local/ssl /opt/local /usr/pkg /usr/sfw" if test "yes" = "$want_native_pkcs11" then use_openssl="native_pkcs11" + want_openssl_hash="no" AC_MSG_RESULT(use of native PKCS11 instead) fi