SSL_OP_NO_TLSv1_2 is not supported by all openssl versions

Esse commit está contido em:
Sara Golemon
2013-03-18 18:14:26 -07:00
commit 1f19c6f051
@@ -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;
}