]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix build with current BoringSSL
authorJouni Malinen <jouni@codeaurora.org>
Tue, 19 Mar 2019 16:15:28 +0000 (18:15 +0200)
committerJouni Malinen <jouni@codeaurora.org>
Tue, 19 Mar 2019 16:24:09 +0000 (18:24 +0200)
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 <jouni@codeaurora.org>
src/crypto/tls_openssl.c

index fc555182076969ce426c1a4a7dfb76006740e708..984b85bda29b9ff91e7304131e460cc2be94376d 100644 (file)
@@ -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"