]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix to check openssl version number only for OpenSSL.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Sat, 12 Jul 2014 12:54:50 +0000 (12:54 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Sat, 12 Jul 2014 12:54:50 +0000 (12:54 +0000)
git-svn-id: file:///svn/unbound/trunk@3179 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog

index e34161aee2ebeab1c8c11963544a798c3ead2d33..2df2b70bae2bd6085f972acb02e18d67ee99f9f7 100755 (executable)
--- a/configure
+++ b/configure
              # 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
index bb1f16ed7790e1a472c36afe2e316ec4bf31b03a..2fb247e95db0d42891c6a0a7053bf545d862dc90 100644 (file)
@@ -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
index 15bae9f735726d93b891c2af9167b481f0acccac..7a1baff5c42d3994e84836a84f7e309cd6ea9c93 100644 (file)
@@ -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).