Merge pull request #162 from deepak1556/certificate_verifier_patch
allow delegate to provide certificate verifier
This commit is contained in:
commit
cbc107f441
2 changed files with 8 additions and 3 deletions
|
@ -142,6 +142,10 @@ URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(const base::Fil
|
|||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
|
||||
}
|
||||
|
||||
net::CertVerifier* URLRequestContextGetter::Delegate::CreateCertVerifier() {
|
||||
return net::CertVerifier::CreateDefault();
|
||||
}
|
||||
|
||||
net::SSLConfigService* URLRequestContextGetter::Delegate::CreateSSLConfigService() {
|
||||
return new net::SSLConfigServiceDefaults;
|
||||
}
|
||||
|
@ -286,7 +290,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
|||
false, // auth_android_negotiate_account_type
|
||||
true); // negotiate_enable_port
|
||||
|
||||
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
|
||||
storage_->set_cert_verifier(delegate_->CreateCertVerifier());
|
||||
storage_->set_transport_security_state(new net::TransportSecurityState);
|
||||
storage_->set_ssl_config_service(delegate_->CreateSSLConfigService());
|
||||
storage_->set_http_auth_handler_factory(auth_handler_factory);
|
||||
|
|
|
@ -44,14 +44,15 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
|
|||
content::URLRequestInterceptorScopedVector* protocol_interceptors);
|
||||
virtual net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory(
|
||||
const base::FilePath& base_path);
|
||||
virtual net::CertVerifier* CreateCertVerifier();
|
||||
virtual net::SSLConfigService* CreateSSLConfigService();
|
||||
virtual bool AllowNTLMCredentialsForDomain(const GURL& auth_origin);
|
||||
virtual bool CanDelegateURLSecurity(const GURL& auth_origin);
|
||||
|
||||
|
||||
private:
|
||||
scoped_ptr<net::URLSecurityManager> orig_url_sec_mgr_;
|
||||
};
|
||||
|
||||
|
||||
class DelegateURLSecurityManager : public net::URLSecurityManager {
|
||||
public:
|
||||
DelegateURLSecurityManager(URLRequestContextGetter::Delegate* delegate);
|
||||
|
|
Loading…
Reference in a new issue