]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix build with LibreSSL and BoringSSL
authorJouni Malinen <j@w1.fi>
Sat, 13 Jul 2019 19:40:50 +0000 (22:40 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 13 Jul 2019 19:49:46 +0000 (22:49 +0300)
The new certificate chain debug dumps used functions that are not
available with LibreSSL or BoringSSL.

Fixes: 857edf4bf43e ("OpenSSL: More debug prints of configured ciphers and certificates")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/tls_openssl.c

index d58cb8227e78ebb00e48ac7c13c5fb62f5eb2d64..07d38e47b917dab320395f4a8273d2a06d81f924 100644 (file)
@@ -5137,6 +5137,8 @@ static void openssl_debug_dump_cipher_list(SSL_CTX *ssl_ctx)
 }
 
 
+#if !defined(LIBRESSL_VERSION_NUMBER) && !defined(BORINGSSL_API_VERSION)
+
 static const char * openssl_pkey_type_str(const EVP_PKEY *pkey)
 {
        if (!pkey)
@@ -5194,9 +5196,12 @@ static void openssl_debug_dump_certificates(SSL_CTX *ssl_ctx)
        openssl_debug_dump_certificate(0, SSL_CTX_get0_certificate(ssl_ctx));
 }
 
+#endif
+
 
 static void openssl_debug_dump_certificate_chains(SSL_CTX *ssl_ctx)
 {
+#if !defined(LIBRESSL_VERSION_NUMBER) && !defined(BORINGSSL_API_VERSION)
        int res;
 
        for (res = SSL_CTX_set_current_cert(ssl_ctx, SSL_CERT_SET_FIRST);
@@ -5205,6 +5210,7 @@ static void openssl_debug_dump_certificate_chains(SSL_CTX *ssl_ctx)
                openssl_debug_dump_certificates(ssl_ctx);
 
        SSL_CTX_set_current_cert(ssl_ctx, SSL_CERT_SET_FIRST);
+#endif
 }