diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-01 08:35:38 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-01 08:35:38 -0400 |
commit | caf4f494378558df14738f2e11b20f0c03674764 (patch) | |
tree | c8994793b992960a76a69516bc4891228a684afd /indra/newview/llsecapi.cpp | |
parent | 9c5d0d6152caff914a6f0159ba4f2382915d4055 (diff) | |
parent | 18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff) |
merge
Diffstat (limited to 'indra/newview/llsecapi.cpp')
-rwxr-xr-x | indra/newview/llsecapi.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp index 43bb7b1596..4f9f83b6f2 100755 --- a/indra/newview/llsecapi.cpp +++ b/indra/newview/llsecapi.cpp @@ -32,7 +32,6 @@ #include <openssl/evp.h> #include <openssl/err.h> #include <map> -#include "llhttpclient.h" @@ -99,46 +98,6 @@ std::ostream& operator <<(std::ostream& s, const LLCredential& cred) return s << (std::string)cred; } - -// secapiSSLCertVerifyCallback -// basic callback called when a cert verification is requested. -// calls SECAPI to validate the context -// not initialized in the above initialization function, due to unit tests -// see llappviewer - -int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param) -{ - LLURLRequest *req = (LLURLRequest *)param; - LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore(""); - LLPointer<LLCertificateChain> chain = gSecAPIHandler->getCertificateChain(ctx); - LLSD validation_params = LLSD::emptyMap(); - LLURI uri(req->getURL()); - validation_params[CERT_HOSTNAME] = uri.hostName(); - try - { - // we rely on libcurl to validate the hostname, as libcurl does more extensive validation - // leaving our hostname validation call mechanism for future additions with respect to - // OS native (Mac keyring, windows CAPI) validation. - store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params); - } - catch (LLCertValidationTrustException& cert_exception) - { - LL_WARNS("AppInit") << "Cert not trusted: " << cert_exception.getMessage() << LL_ENDL; - return 0; - } - catch (LLCertException& cert_exception) - { - LL_WARNS("AppInit") << "cert error " << cert_exception.getMessage() << LL_ENDL; - return 0; - } - catch (...) - { - LL_WARNS("AppInit") << "cert error " << LL_ENDL; - return 0; - } - return 1; -} - LLSD LLCredential::getLoginParams() { LLSD result = LLSD::emptyMap(); |