aboutsummaryrefslogtreecommitdiff
path: root/lib/ssluse.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-10-16 00:49:23 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-10-16 00:49:23 +0100
commit87861c9b0e81558c8db1f188063233c0e5893688 (patch)
treec7e994b6039ba7e8de3835c6b7316f831c7d392f /lib/ssluse.c
parent4d49ffe165a51d45cef79bf81cb867dbcf06b092 (diff)
SSL: Fixed OpenSSL builds prior to v1.0.1
Commit ad34a2d5c87c7f relies on definitions that are only present in OpenSSL v1.0.1 and up. This quick fix allows the builds that use older versions of OpenSSL to continue building.
Diffstat (limited to 'lib/ssluse.c')
-rw-r--r--lib/ssluse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 84fd73738..4d903927c 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1566,20 +1566,28 @@ ossl_connect_step1(struct connectdata *conn,
case CURL_SSLVERSION_TLSv1_0:
ctx_options |= SSL_OP_NO_SSLv2;
ctx_options |= SSL_OP_NO_SSLv3;
+#if defined(SSL_OP_NO_TLSv1_1)
ctx_options |= SSL_OP_NO_TLSv1_1;
+#endif
+#if defined(SSL_OP_NO_TLSv1_2)
ctx_options |= SSL_OP_NO_TLSv1_2;
+#endif
break;
case CURL_SSLVERSION_TLSv1_1:
ctx_options |= SSL_OP_NO_SSLv2;
ctx_options |= SSL_OP_NO_SSLv3;
ctx_options |= SSL_OP_NO_TLSv1;
+#if defined(SSL_OP_NO_TLSv1_1)
ctx_options |= SSL_OP_NO_TLSv1_2;
+#endif
break;
case CURL_SSLVERSION_TLSv1_2:
ctx_options |= SSL_OP_NO_SSLv2;
ctx_options |= SSL_OP_NO_SSLv3;
ctx_options |= SSL_OP_NO_TLSv1;
+#if defined(SSL_OP_NO_TLSv1_1)
ctx_options |= SSL_OP_NO_TLSv1_1;
+#endif
break;
}