Merge branch 'curlthreading2' into curlthreading3

This commit is contained in:
Aleric Inglewood
2012-09-11 17:05:13 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -1132,6 +1132,7 @@ CURLcode CurlEasyRequest::curlCtxCallback(CURL* curl, void* sslctx, void* parm)
// Also turn off SSL v2, which is highly broken and strongly discouraged[1].
// [1] http://www.openssl.org/docs/ssl/SSL_CTX_set_options.html#SECURE_RENEGOTIATION
long options = SSL_OP_NO_SSLv2;
#ifdef SSL_OP_NO_TLSv1_1 // Only defined for openssl version 1.0.1 and up.
if (need_renegotiation_hack)
{
// This option disables openssl to use TLS version 1.1.
@@ -1145,6 +1146,9 @@ CURLcode CurlEasyRequest::curlCtxCallback(CURL* curl, void* sslctx, void* parm)
// which finishes the negotiation and ends with 'Verify return code: 0 (ok)'
options |= SSL_OP_NO_TLSv1_1;
}
#else
llassert_always(!need_renegotiation_hack);
#endif
SSL_CTX_set_options(ctx, options);
return CURLE_OK;
}