summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcurl.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2010-01-20 15:48:13 -0500
committerNat Goodspeed <nat@lindenlab.com>2010-01-20 15:48:13 -0500
commitdf7e5dd1dc491e6f2a8bcff44d75f8e2113b8b6f (patch)
tree526b2bf6e9516f6652c5cf8736296be6549f7746 /indra/llmessage/llcurl.h
parentea875ca0eb3e3f9c5f7398ad721f5e2dd1427cf1 (diff)
DEV-35248: Allow NoVerifySSLCert to uniformly disable verification
Introduce static LLCurl SSL verification flag, default 'true', accessed by LLCurl::setSSLVerify() and getSSLVerify(). Make LLCurl::Easy::prepRequest() check LLCurl::getSSLVerify() instead of unconditionally setting CURLOPT_SSL_VERIFYPEER 'true'. Also set CURLOPT_SSL_VERIFYHOST to match. Make LLXMLRPCTransaction::Impl::init() examine LLCurl::getSSLVerify(), instead of directly examining gSavedSettings.getBOOL("NoVerifySSLCert"). Make LLURLRequest::checkRootCertificate() set CURLOPT_SSL_VERIFYHOST as well as CURLOPT_SSL_VERIFYPEER. Make request() in llhttpclient.cpp (used by LLHTTPClient::getByteRange(), head(), get(), getHeaderOnly(), put(), post(), postRaw(), postFile(), del(), move()) pass LLCurl::getSSLVerify() to checkRootCertificate(), rather than constant 'true'. Make LLAppViewer::mainLoop() call LLCurl::setSSLVerify(! gSavedSettings.getBOOL("NoVerifySSLCert")) at the same time it calls LLCurl::setCAFile(), a comparable bit of static setup.
Diffstat (limited to 'indra/llmessage/llcurl.h')
-rw-r--r--indra/llmessage/llcurl.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index 1bc1767966..caf02cccd9 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -158,6 +158,16 @@ public:
static const std::string& getCAPath() { return sCAPath; }
/**
+ * @ brief Set flag controlling whether to verify HTTPS certs.
+ */
+ static void setSSLVerify(bool verify);
+
+ /**
+ * @ brief Get flag controlling whether to verify HTTPS certs.
+ */
+ static bool getSSLVerify();
+
+ /**
* @ brief Initialize LLCurl class
*/
static void initClass();
@@ -182,6 +192,7 @@ public:
private:
static std::string sCAPath;
static std::string sCAFile;
+ static bool sSSLVerify;
};
namespace boost