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; }