From bf84e78cbce32f4fff0d7a637ea096b85a52b6bf Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 19 Mar 2019 18:15:28 +0200 Subject: [PATCH] OpenSSL: Fix build with current BoringSSL SSL_use_certificate_chain_file() is not available in the current BoringSSL even though the defined OPENSSL_VERSION_NUMBER is large enough to claim that this function would be present in the OpenSSL API. Fall back to using SSL_use_certificate_file() with BoringSSL to fix the build. Signed-off-by: Jouni Malinen --- src/crypto/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index fc5551820..984b85bda 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -3119,7 +3119,8 @@ static int tls_connection_client_cert(struct tls_connection *conn, return 0; } -#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \ + !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_IS_BORINGSSL) if (SSL_use_certificate_chain_file(conn->ssl, client_cert) == 1) { ERR_clear_error(); wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_certificate_chain_file"