From: Jouni Malinen Date: Sat, 23 Apr 2022 10:05:49 +0000 (+0300) Subject: OpenSSL: Fix build with BoringSSL X-Git-Tag: hostap_2_11~2017 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7be558d691382edc2dc57863e556d52ae5f7370;p=thirdparty%2Fhostap.git OpenSSL: Fix build with BoringSSL SSL_CTX_set_dh_auto() is not available in BoringSSL even though it claims to be based on OpenSSL 1.1.1 in OPENSSL_VERSION_NUMBER. Fixes: ebb3055e1302 ("OpenSSL: Generate DH parameters automatically if not set with dh_file") Signed-off-by: Jouni Malinen --- diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index 56681b25d..6fe816950 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -4052,7 +4052,7 @@ static int tls_global_dh(struct tls_data *data, const char *dh_file) if (!ssl_ctx) return -1; if (!dh_file) { -#if OPENSSL_VERSION_NUMBER >= 0x10100000L +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(OPENSSL_IS_BORINGSSL) SSL_CTX_set_dh_auto(ssl_ctx, 1); #endif return 0;