From 5b1b660e94e9340a037a76cbfd6471f684d98a3e Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Sat, 12 Jul 2014 12:54:50 +0000 Subject: [PATCH] - Fix to check openssl version number only for OpenSSL. git-svn-id: file:///svn/unbound/trunk@3179 be551aaa-1e26-0410-a405-d3ace91eadb9 --- configure | 10 ++++++++-- configure.ac | 11 ++++++++--- doc/Changelog | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/configure b/configure index e34161aee..2df2b70ba 100755 --- a/configure +++ b/configure @@ -17065,15 +17065,21 @@ fi # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; } - if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then + if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } cat >>confdefs.h <<_ACEOF #define USE_ECDSA_EVP_WORKAROUND 1 _ACEOF + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi else + # not OpenSSL, thus likely LibreSSL, which supports it { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi diff --git a/configure.ac b/configure.ac index bb1f16ed7..2fb247e95 100644 --- a/configure.ac +++ b/configure.ac @@ -721,10 +721,15 @@ case "$enable_ecdsa" in ]) # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency) AC_MSG_CHECKING([if openssl supports SHA2 and ECDSA with EVP]) - if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then - AC_MSG_RESULT([no]) - AC_DEFINE_UNQUOTED([USE_ECDSA_EVP_WORKAROUND], [1], [Define this to enable an EVP workaround for older openssl]) + if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then + if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then + AC_MSG_RESULT([no]) + AC_DEFINE_UNQUOTED([USE_ECDSA_EVP_WORKAROUND], [1], [Define this to enable an EVP workaround for older openssl]) + else + AC_MSG_RESULT([yes]) + fi else + # not OpenSSL, thus likely LibreSSL, which supports it AC_MSG_RESULT([yes]) fi fi diff --git a/doc/Changelog b/doc/Changelog index 15bae9f73..7a1baff5c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 12 July 2014: Wouter - Fix getentropy compat code, function refs were not portable. + - Fix to check openssl version number only for OpenSSL. 11 July 2014: Matthijs - fake-rfc2553 patch (thanks Benjamin Baier). -- 2.47.2