Skip to content
Snippets Groups Projects
Commit 2be32eed authored by Oz Linden's avatar Oz Linden
Browse files

fail in initialization if there is no CA bundle (instead of waiting for an...

fail in initialization if there is no CA bundle (instead of waiting for an opaque connection failure)
parent ba93f428
No related branches found
No related tags found
No related merge requests found
...@@ -154,9 +154,19 @@ void LLAppCoreHttp::init() ...@@ -154,9 +154,19 @@ void LLAppCoreHttp::init()
} }
// Point to our certs or SSH/https: will fail on connect // Point to our certs or SSH/https: will fail on connect
status = LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_CA_FILE, std::string ca_file = gDirUtilp->getCAFile();
LLCore::HttpRequest::GLOBAL_POLICY_ID, if ( LLFile::isfile(ca_file) )
gDirUtilp->getCAFile(), NULL); {
LL_DEBUGS("Init") << "Setting CA File to " << ca_file << LL_ENDL;
status = LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_CA_FILE,
LLCore::HttpRequest::GLOBAL_POLICY_ID,
ca_file, NULL);
}
else
{
LL_ERRS("Init") << "Missing CA File; should be at " << ca_file << LL_ENDL;
}
if (! status) if (! status)
{ {
LL_ERRS("Init") << "Failed to set CA File for HTTP services. Reason: " << status.toString() LL_ERRS("Init") << "Failed to set CA File for HTTP services. Reason: " << status.toString()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment