summaryrefslogtreecommitdiff
path: root/indra/newview/llappcorehttp.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-11 16:31:15 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-11 16:31:15 +0300
commit8594be3b9a6518ae25b99f920358a61ed4bae1a1 (patch)
treeb384ed8f54ef6beca9adfd085657861ac4a20299 /indra/newview/llappcorehttp.cpp
parent81553d1b8cacde537ceff10c8f24806a7f94ad36 (diff)
SL-13927 Turn SSL verification On for all SL services in viewer
Diffstat (limited to 'indra/newview/llappcorehttp.cpp')
-rw-r--r--indra/newview/llappcorehttp.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index 134a34137b..3da87e657c 100644
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -116,6 +116,7 @@ static const struct
};
static void setting_changed();
+static void ssl_verification_changed();
LLAppCoreHttp::HttpClass::HttpClass()
@@ -195,6 +196,23 @@ void LLAppCoreHttp::init()
LL_WARNS("Init") << "Failed to set SSL Verification. Reason: " << status.toString() << LL_ENDL;
}
+ // Set up Default SSL Verification option.
+ const std::string no_verify_ssl("NoVerifySSLCert");
+ if (gSavedSettings.controlExists(no_verify_ssl))
+ {
+ LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl(no_verify_ssl);
+ if (cntrl_ptr.isNull())
+ {
+ LL_WARNS("Init") << "Unable to set signal on global setting '" << no_verify_ssl
+ << "'" << LL_ENDL;
+ }
+ else
+ {
+ mSSLNoVerifySignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&ssl_verification_changed));
+ LLCore::HttpOptions::setDefaultSSLVerifyPeer(!cntrl_ptr->getValue().asBoolean());
+ }
+ }
+
// Tracing levels for library & libcurl (note that 2 & 3 are beyond spammy):
// 0 - None
// 1 - Basic start, stop simple transitions
@@ -296,6 +314,11 @@ void setting_changed()
LLAppViewer::instance()->getAppCoreHttp().refreshSettings(false);
}
+void ssl_verification_changed()
+{
+ LLCore::HttpOptions::setDefaultSSLVerifyPeer(!gSavedSettings.getBOOL("NoVerifySSLCert"));
+}
+
namespace
{
// The NoOpDeletor is used when wrapping LLAppCoreHttp in a smart pointer below for
@@ -355,6 +378,7 @@ void LLAppCoreHttp::cleanup()
{
mHttpClasses[i].mSettingsSignal.disconnect();
}
+ mSSLNoVerifySignal.disconnect();
mPipelinedSignal.disconnect();
delete mRequest;