--- openvpn-2.3.10.orig/src/openvpn/ssl_openssl.c	2016-01-04 13:17:32.000000000 +0100
+++ openvpn-2.3.10/src/openvpn/ssl_openssl.c	2016-02-07 15:42:02.000000000 +0100
@@ -342,7 +342,7 @@ tls_ctx_check_cert_time (const struct tl
 
   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
@@ -377,7 +377,7 @@ tls_ctx_check_cert_time (const struct tl
     }
 
 cleanup:
-#if OPENSSL_VERSION_NUMBER < 0x10002000L
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
   SSL_free (ssl);
 #endif
   return;
