From 1f19c6f051b2a42252bf4b6544f2501a094c281e Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Mon, 18 Mar 2013 18:14:26 -0700 Subject: [PATCH] SSL_OP_NO_TLSv1_2 is not supported by all openssl versions --- hphp/runtime/base/util/curl_tls_workarounds.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hphp/runtime/base/util/curl_tls_workarounds.cpp b/hphp/runtime/base/util/curl_tls_workarounds.cpp index 7ead433cf..d5bca0e34 100644 --- a/hphp/runtime/base/util/curl_tls_workarounds.cpp +++ b/hphp/runtime/base/util/curl_tls_workarounds.cpp @@ -25,8 +25,13 @@ namespace HPHP { CURLcode curl_tls_workarounds_cb(CURL *curl, void *sslctx, void *parm) { // Check to see if workarounds are enabled. if (RuntimeOption::TLSDisableTLS1_2) { +#ifdef SSL_OP_NO_TLSv1_2 SSL_CTX* ctx = (SSL_CTX*)sslctx; SSL_CTX_set_options(ctx, SSL_CTX_get_options (ctx) | SSL_OP_NO_TLSv1_2); +#else + raise_notice("TLSDisableTLS1_2 enabled, but this version of " + "SSL does not support that option"); +#endif } return CURLE_OK; }