diff options
| author | James Cook <james@lindenlab.com> | 2010-05-13 15:47:32 -0700 |
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2010-05-13 15:47:32 -0700 |
| commit | 8b524549902b780c2833691368bc35bdb1837cd9 (patch) | |
| tree | b742a7f5463fb42663fa51e1029c80671ceb881b /indra/llmessage/llhttpclient.cpp | |
| parent | 14f423a23c38bf554e9633752074fbcabd92599c (diff) | |
| parent | aebb49520b1919e0ac2bcc7373fc2db031e3b7f0 (diff) | |
merge pull from dessie/viewer-public, picking up SLE code
Diffstat (limited to 'indra/llmessage/llhttpclient.cpp')
| -rw-r--r-- | indra/llmessage/llhttpclient.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 964cbd1026..9c2e4b5658 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -31,7 +31,7 @@ */ #include "linden_common.h" - +#include <openssl/x509_vfy.h> #include "llhttpclient.h" #include "llassetstorage.h" @@ -46,7 +46,10 @@ #include "message.h" #include <curl/curl.h> + const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f; +LLURLRequest::SSLCertVerifyCallback LLHTTPClient::mCertVerifyCallback = NULL; + //////////////////////////////////////////////////////////////////////////// // Responder class moved to LLCurl @@ -208,13 +211,19 @@ namespace LLPumpIO* theClientPump = NULL; } +void LLHTTPClient::setCertVerifyCallback(LLURLRequest::SSLCertVerifyCallback callback) +{ + LLHTTPClient::mCertVerifyCallback = callback; +} + static void request( const std::string& url, LLURLRequest::ERequestAction method, Injector* body_injector, LLCurl::ResponderPtr responder, const F32 timeout = HTTP_REQUEST_EXPIRY_SECS, - const LLSD& headers = LLSD()) + const LLSD& headers = LLSD() + ) { if (!LLHTTPClient::hasPump()) { @@ -224,7 +233,7 @@ static void request( LLPumpIO::chain_t chain; LLURLRequest* req = new LLURLRequest(method, url); - req->checkRootCertificate(LLCurl::getSSLVerify()); + req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req); lldebugs << LLURLRequest::actionAsVerb(method) << " " << url << " " @@ -419,7 +428,6 @@ static LLSD blocking_request( std::string body_str; // other request method checks root cert first, we skip? - //req->checkRootCertificate(true); // * Set curl handle options curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts |
