From: Viktor Szakats Date: Wed, 1 Jan 2025 04:16:24 +0000 (+0100) Subject: multissl: auto-enable `OPENSSL_COEXIST` for wolfSSL + OpenSSL X-Git-Tag: curl-8_12_0~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98932f34879bba86339b8ca94ba04aa994c744f8;p=thirdparty%2Fcurl.git multissl: auto-enable `OPENSSL_COEXIST` for wolfSSL + OpenSSL 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 --- diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 2eba74e52f..b46b672d44 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -743,6 +743,17 @@ #define USE_SSL /* SSL support has been enabled */ #endif +#if defined(USE_OPENSSL) && defined(USE_WOLFSSL) +# include +# 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