Skip to content

Commit d230054

Browse files
committed
Change to TLS version negotiation patch: remove implicit assumption
that SSL lib might not implement TLS 1.0.
1 parent 2771376 commit d230054

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/openvpn/ssl_openssl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,8 @@ tls_ctx_set_options (struct tls_root_ctx *ctx, unsigned int ssl_flags)
200200
{
201201
long sslopt = SSL_OP_SINGLE_DH_USE | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
202202
const int tls_version_min = (ssl_flags >> SSLF_TLS_VERSION_SHIFT) & SSLF_TLS_VERSION_MASK;
203-
#ifdef SSL_OP_NO_TLSv1
204203
if (tls_version_min > TLS_VER_1_0)
205204
sslopt |= SSL_OP_NO_TLSv1;
206-
#endif
207205
#ifdef SSL_OP_NO_TLSv1_1
208206
if (tls_version_min > TLS_VER_1_1)
209207
sslopt |= SSL_OP_NO_TLSv1_1;

src/openvpn/ssl_polarssl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,11 @@ void key_state_ssl_init(struct key_state_ssl *ks_ssl,
569569
int polar_minor;
570570
switch (tls_version_min)
571571
{
572-
#if defined(SSL_MAJOR_VERSION_3) && defined(SSL_MINOR_VERSION_1)
573572
case TLS_VER_1_0:
574573
default:
575574
polar_major = SSL_MAJOR_VERSION_3;
576575
polar_minor = SSL_MINOR_VERSION_1;
577576
break;
578-
#endif
579577
#if defined(SSL_MAJOR_VERSION_3) && defined(SSL_MINOR_VERSION_2)
580578
case TLS_VER_1_1:
581579
polar_major = SSL_MAJOR_VERSION_3;

0 commit comments

Comments
 (0)