]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multissl: auto-enable `OPENSSL_COEXIST` for wolfSSL + OpenSSL
authorViktor Szakats <commit@vsz.me>
Wed, 1 Jan 2025 04:16:24 +0000 (05:16 +0100)
committerViktor Szakats <commit@vsz.me>
Wed, 1 Jan 2025 05:20:30 +0000 (06:20 +0100)
When building with both OpenSSL and wolfSSL set this necessary option.
Otherwise fail with an error.

Requires wolfSSL v5.7.6 or upper.

Closes #15765

lib/curl_setup.h

index 2eba74e52f5d39d1f34224d6e4ce3da8f254fa7d..b46b672d4406b23bf96d7fa40d50b0a41494e784 100644 (file)
 #define USE_SSL    /* SSL support has been enabled */
 #endif
 
+#if defined(USE_OPENSSL) && defined(USE_WOLFSSL)
+#  include <wolfssl/version.h>
+#  if LIBWOLFSSL_VERSION_HEX >= 0x05007006
+#    ifndef OPENSSL_COEXIST
+#    define OPENSSL_COEXIST
+#    endif
+#  else
+#    error "OpenSSL can only coexist with wolfSSL v5.7.6 or upper"
+#  endif
+#endif
+
 #if defined(USE_WOLFSSL) && defined(USE_GNUTLS)
 /* Avoid defining unprefixed wolfSSL SHA macros colliding with nettle ones */
 #define NO_OLD_WC_NAMES