From 2caff11d7aa53ec00fcad7ae0d9c12b2deadbdd0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 22 Aug 2020 11:32:01 +0300 Subject: [PATCH] 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 --- src/crypto/tls_openssl.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.47.2