]> granicus.if.org Git - curl/commitdiff
SSL: Fixed OpenSSL builds prior to v1.0.1
authorSteve Holme <steve_holme@hotmail.com>
Tue, 15 Oct 2013 23:49:23 +0000 (00:49 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Tue, 15 Oct 2013 23:49:23 +0000 (00:49 +0100)
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.

lib/ssluse.c

index 84fd7373858a35c8c83a8edbee8f2b74c93d9d8d..4d903927c7011152b8328ee3c92db61709832880 100644 (file)
@@ -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;
   }