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: ebb3055e13 ("OpenSSL: Generate DH parameters automatically if not set with dh_file")
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2022-04-23 13:05:49 +03:00
parent 6d33ef362e
commit f7be558d69

View file

@ -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;