From: Jouni Malinen Date: Sat, 22 Aug 2020 08:32:01 +0000 (+0300) Subject: LibreSSL: Fix build with LibreSSL versions older than 2.9.1 X-Git-Tag: hostap_2_10~988 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2caff11d7aa53ec00fcad7ae0d9c12b2deadbdd0;p=thirdparty%2Fhostap.git LibreSSL: Fix build with LibreSSL versions older than 2.9.1 SSL_add0_chain_cert() was not available in LibreSSL before version 2.9.1. Fixes: 4b834df5e08a ("OpenSSL: Support PEM encoded chain from client_cert blob") Signed-off-by: Jouni Malinen --- diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index 0f9664ec5..e73dd7f5b 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -3252,6 +3252,10 @@ static int tls_connection_client_cert(struct tls_connection *conn, "OK"); return 0; } else if (client_cert_blob) { +#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20901000L + tls_show_errors(MSG_DEBUG, __func__, + "SSL_use_certificate_ASN1 failed"); +#else BIO *bio; X509 *x509; @@ -3277,6 +3281,7 @@ static int tls_connection_client_cert(struct tls_connection *conn, } BIO_free(bio); return 0; +#endif } if (client_cert == NULL)