diff options
author | Michael BrĂ¼ning <michael.bruning@digia.com> | 2013-07-12 12:11:27 +0200 |
---|---|---|
committer | Michael Bruning <michael.bruning@digia.com> | 2013-07-12 13:08:42 +0200 |
commit | 9407e2205c6e438efc222efb6694472dd17a865b (patch) | |
tree | 290c37d808d290f02170f5a65459295a9b7ed4e3 /lib/url_request_context_getter_qt.cpp | |
parent | a62cc1f3731e0ba7620bf29756364785fc5a9cde (diff) |
Set up TransportSecurityState for UrlRequestContext.
Trying to connect to an ssl socket will trigger an assertion
now if there is no valid TransportSecurityState specified.
Hence, we create one now and pass it with the
HttpNetworkSession::Params.
Change-Id: I61cda2d0b662a95d32085092e74e0499c008c57f
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'lib/url_request_context_getter_qt.cpp')
-rw-r--r-- | lib/url_request_context_getter_qt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/url_request_context_getter_qt.cpp b/lib/url_request_context_getter_qt.cpp index 64ce59095..2f2d89e30 100644 --- a/lib/url_request_context_getter_qt.cpp +++ b/lib/url_request_context_getter_qt.cpp @@ -102,6 +102,8 @@ net::URLRequestContext *URLRequestContextGetterQt::GetURLRequestContext() m_storage->set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(m_proxyConfigService.release(), 0, NULL)); m_storage->set_ssl_config_service(new net::SSLConfigServiceDefaults); + m_storage->set_transport_security_state(new net::TransportSecurityState()); + m_storage->set_http_auth_handler_factory( net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); m_storage->set_http_server_properties(new net::HttpServerPropertiesImpl); @@ -117,6 +119,8 @@ net::URLRequestContext *URLRequestContextGetterQt::GetURLRequestContext() BrowserThread::CACHE)); net::HttpNetworkSession::Params network_session_params; + network_session_params.transport_security_state = + m_urlRequestContext->transport_security_state(); network_session_params.cert_verifier = m_urlRequestContext->cert_verifier(); network_session_params.server_bound_cert_service = |