- Define OPENSSL_SUPPRESS_DEPRECATED.
OpenSSL 3 has deprecated some of the functions libcurl uses such as
those with DES, MD5 and ENGINE prefix. We don't have replacements for
those functions so the warnings were disabled in autotools and cmake
builds, but still showed in other builds.
Closes https://github.com/curl/curl/pull/10543
if(NOT DEFINED HAVE_BORINGSSL)
check_symbol_exists(OPENSSL_IS_BORINGSSL "openssl/base.h" HAVE_BORINGSSL)
endif()
-
- add_definitions(-DOPENSSL_SUPPRESS_DEPRECATED)
endif()
if(CURL_USE_MBEDTLS)
# endif
#endif
+/* OpenSSLv3 marks DES, MD5 and ENGINE functions deprecated but we have no
+ replacements (yet) so tell the compiler to not warn for them. */
+#ifdef USE_OPENSSL
+#define OPENSSL_SUPPRESS_DEPRECATED
+#endif
+
#endif /* HEADER_CURL_SETUP_H */
AC_DEFINE_UNQUOTED(HAVE_OPENSSL3, 1, [Define to 1 if using OpenSSL 3 or later.])
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
openssl/pem.h openssl/ssl.h openssl/err.h)
- 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"
],[
AC_MSG_RESULT([no])
])
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])