]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: Improve check for OpenSSL without EC support
authorPaul Howarth <paul@city-fan.org>
Fri, 28 Oct 2016 14:10:16 +0000 (17:10 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 28 Oct 2016 14:10:57 +0000 (17:10 +0300)
The original test was for EC_KEY_new but some systems had that and not
EVP_PKEY_CTX_new_id, so the test was switched to that function.
However, Fedora releases 12 through 17 have EVP_PKEY_CTX_new_id but
not EC_KEY_new. So we need to test for both functions before enabling
the dcrypt build.

configure.ac

index 1629ddd2956b26368edd8a320699d2eaad4a87f0..f6c4fca3ba807fd54cb4bae7fe9a0241789e6215 100644 (file)
@@ -1716,10 +1716,13 @@ if test $want_openssl != no && test $have_ssl = no; then
     AC_CHECK_LIB(ssl, SSL_COMP_free_compression_methods, [
       AC_DEFINE(HAVE_SSL_COMP_FREE_COMPRESSION_METHODS,, [Build with SSL_COMP_free_compression_methods() support])
     ],, $SSL_LIBS)
-    AC_CHECK_LIB(ssl, [EVP_PKEY_CTX_new_id],
-       [build_dcrypt_openssl="yes"],
-       AC_MSG_WARN([No ECC support in OpenSSL - not enabling dcrypt]),
-    $SSL_LIBS)
+    AC_CHECK_LIB(ssl, [EVP_PKEY_CTX_new_id], [have_evp_pkey_ctx_new_id="yes"],, $SSL_LIBS)
+    AC_CHECK_LIB(ssl, [EC_KEY_new], [have_ec_key_new="yes"],, $SSL_LIBS)
+    if test "$have_evp_pkey_ctx_new_id" = "yes" && test "$have_ec_key_new" = "yes"; then
+      build_dcrypt_openssl="yes"
+    else
+      AC_MSG_WARN([No ECC support in OpenSSL - not enabling dcrypt])
+    fi
   fi
 fi