summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcurl.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-03-01 15:31:04 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-03-01 15:31:04 -0800
commitb11a625e6ff89470d25273fa426ed13f7abc4a6a (patch)
treea5e923a8211926f119f1cf45ded6cd4222c9250b /indra/llmessage/llcurl.cpp
parent6575b685e91d334198789c88dec2efab7e5a1ac9 (diff)
parenta2efe4bb4154b7ecb9c7cb279f7a28d7d401a93a (diff)
Automated merge with a few fixups for code review comments
Diffstat (limited to 'indra/llmessage/llcurl.cpp')
-rw-r--r--indra/llmessage/llcurl.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 024e17a777..91e11b8c0d 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -89,10 +89,6 @@ S32 gCurlMultiCount = 0;
std::vector<LLMutex*> LLCurl::sSSLMutex;
std::string LLCurl::sCAPath;
std::string LLCurl::sCAFile;
-// Verify SSL certificates by default (matches libcurl default). The ability
-// to alter this flag is only to allow us to suppress verification if it's
-// broken for some reason.
-bool LLCurl::sSSLVerify = true;
//static
void LLCurl::setCAPath(const std::string& path)
@@ -107,18 +103,6 @@ void LLCurl::setCAFile(const std::string& file)
}
//static
-void LLCurl::setSSLVerify(bool verify)
-{
- sSSLVerify = verify;
-}
-
-//static
-bool LLCurl::getSSLVerify()
-{
- return sSSLVerify;
-}
-
-//static
std::string LLCurl::getVersionString()
{
return std::string(curl_version());
@@ -481,8 +465,7 @@ void LLCurl::Easy::prepRequest(const std::string& url,
setErrorBuffer();
setCA();
- setopt(CURLOPT_SSL_VERIFYPEER, LLCurl::getSSLVerify());
- setopt(CURLOPT_SSL_VERIFYHOST, LLCurl::getSSLVerify()? 2 : 0);
+ setopt(CURLOPT_SSL_VERIFYPEER, true);
setopt(CURLOPT_TIMEOUT, CURL_REQUEST_TIMEOUT);
setoptString(CURLOPT_URL, url);
@@ -912,6 +895,15 @@ void LLCurlEasyRequest::setReadCallback(curl_read_callback callback, void* userd
}
}
+void LLCurlEasyRequest::setSSLCtxCallback(curl_ssl_ctx_callback callback, void* userdata)
+{
+ if (mEasy)
+ {
+ mEasy->setopt(CURLOPT_SSL_CTX_FUNCTION, (void*)callback);
+ mEasy->setopt(CURLOPT_SSL_CTX_DATA, userdata);
+ }
+}
+
void LLCurlEasyRequest::slist_append(const char* str)
{
if (mEasy)
@@ -1061,3 +1053,4 @@ void LLCurl::cleanupClass()
#endif
curl_global_cleanup();
}
+