From: Niels Ole Salscheider Date: Sun, 10 Jan 2016 13:44:35 +0000 (+0100) Subject: Fix build with libressl X-Git-Tag: v2.3.11~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bb0d8de83cbef4de8551f5a1b9dcbe6afbd6aa0;p=thirdparty%2Fopenvpn.git Fix build with libressl Signed-off-by: Niels Ole Salscheider Acked-by: Steffan Karger Message-Id: <1452433475-16779-1-git-send-email-niels_ole@salscheider-online.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/10975 Signed-off-by: Gert Doering (cherry picked from commit 9dfc2309c6b4143892137844197f5f84755f6580) --- diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 36c8efe05..e67f60ed3 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -345,7 +345,7 @@ tls_ctx_check_cert_time (const struct tls_root_ctx *ctx) ASSERT (ctx); -#if OPENSSL_VERSION_NUMBER >= 0x10002000L +#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) /* OpenSSL 1.0.2 and up */ cert = SSL_CTX_get0_certificate (ctx->ctx); #else @@ -380,7 +380,7 @@ tls_ctx_check_cert_time (const struct tls_root_ctx *ctx) } cleanup: -#if OPENSSL_VERSION_NUMBER < 0x10002000L +#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) SSL_free (ssl); #endif return;