diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-03-23 12:28:20 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-03-26 00:40:32 +0100 |
commit | 02174e41f5c6199fb6f00b1900e1ea89821db321 (patch) | |
tree | 5f4a7f44464841819085a11f1c07ca42be360517 /configure.ac | |
parent | 35318218b8a0f4082266c839710c4c67ea79deae (diff) | |
download | curl-02174e41f5c6199fb6f00b1900e1ea89821db321.tar.gz |
openssl: adapt to functions marked as deprecated since version 3
OpenSSL 3 deprecates SSL_CTX_load_verify_locations and the MD4, DES
functions we use.
Fix the MD4 and SSL_CTX_load_verify_locations warnings.
In configure, detect OpenSSL v3 and if so, inhibit the deprecation
warnings. OpenSSL v3 deprecates the DES functions we use for NTLM and
until we rewrite the code to use non-deprecated functions we better
ignore these warnings as they don't help us.
Closes #5139
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 973394bce..31fc8ffb7 100755 --- a/configure.ac +++ b/configure.ac @@ -1873,6 +1873,31 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno && ],[ AC_MSG_RESULT([no]) ]) + + AC_MSG_CHECKING([for OpenSSL >= v3]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include <openssl/opensslv.h> + ]],[[ + #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + return 0; + #else + #error older than 3 + #endif + ]]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED(HAVE_OPENSSL3, 1, + [Define to 1 if using OpenSSL 3 or later.]) + dnl OpenSSLv3 marks the DES functions deprecated but we have no + dnl replacements (yet) so tell the compiler to not warn for them + dnl + dnl Ask OpenSSL to suppress the warnings. + CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED" + ssl_msg="OpenSSL v3+" + ],[ + AC_MSG_RESULT([no]) + ]) fi if test "$OPENSSL_ENABLED" = "1"; then |