summaryrefslogtreecommitdiff
path: root/indra/newview/llappcorehttp.cpp
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2021-07-19 22:24:33 +0000
committerEuclid Linden <euclid@lindenlab.com>2021-07-19 22:24:33 +0000
commit1b15b8cda7853e55a91fd0140311ed69f3cca677 (patch)
tree33edfb0495161594a50dcfbed3a3f42e7fde9143 /indra/newview/llappcorehttp.cpp
parentdc14dbf54d332a6cdc43002bb71ed71e9a473647 (diff)
parent4c849ba91363f82da05cce1221b04075a6ca72af (diff)
Merged in DV528-merge-6.4.22 (pull request #630)
DRTVWR-528 merge up to v 6.4.22
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;