Don't set a SSL ctx callback when we don't use openSSL.

This commit is contained in:
Aleric Inglewood
2014-08-26 19:19:06 +02:00
parent eb0d2e5b2c
commit 9b930c8716

View File

@@ -1087,7 +1087,10 @@ void CurlEasyRequest::applyDefaultOptions(void)
{
CertificateAuthority_rat CertificateAuthority_r(gCertificateAuthority);
setoptString(CURLOPT_CAINFO, CertificateAuthority_r->file);
setSSLCtxCallback(&curlCtxCallback, NULL);
if (gSSLlib == ssl_openssl)
{
setSSLCtxCallback(&curlCtxCallback, NULL);
}
setopt(CURLOPT_NOSIGNAL, 1);
// Cache DNS look ups an hour. If we set it smaller we risk frequent connect timeouts in cases where DNS look ups are slow.
setopt(CURLOPT_DNS_CACHE_TIMEOUT, 3600);