]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add missing #ifdef SSL_OP_NO_TLSv1_1/2
authorSimon Matter <simon.matter@invoca.ch>
Fri, 2 Mar 2018 07:49:31 +0000 (08:49 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 2 Mar 2018 07:52:34 +0000 (08:52 +0100)
Release/2.4 supports older OpenSSL versions than master, so when
cherrypicking f8a92a4393a -> 2d705accea3e53 these code bits should
have received an #ifdef to ensure compatibility (as done for the
same define in other places in 2.4 already).  Add them now.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <52e860ea74ac958309368374049f14bd.squirrel@webmail.bi.invoca.ch>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg16588.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/openssl_compat.h

index c3152d0c13dd2987d033597f02aba56cfe263b6a..9f5306979cee73d440a01dd45c5a69a089524a2b 100644 (file)
@@ -672,14 +672,18 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
     {
         return TLS1_VERSION;
     }
+#ifdef SSL_OP_NO_TLSv1_1
     if (!(sslopt & SSL_OP_NO_TLSv1_1))
     {
         return TLS1_1_VERSION;
     }
+#endif
+#ifdef SSL_OP_NO_TLSv1_2
     if (!(sslopt & SSL_OP_NO_TLSv1_2))
     {
         return TLS1_2_VERSION;
     }
+#endif
     return 0;
 }
 #endif /* SSL_CTX_get_min_proto_version */