Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: remoting/protocol/ssl_hmac_channel_authenticator.cc

Issue 16501002: Give more request types a TransportSecurityState. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enforce CalledOnValidThread in all non-static methods. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/ssl_hmac_channel_authenticator.h ('k') | webkit/support/test_shell_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/ssl_hmac_channel_authenticator.cc
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.cc b/remoting/protocol/ssl_hmac_channel_authenticator.cc
index 587d71a9eead208a98f4f3274ff502ad2f0a7318..93249bde66b02819dee20d1a5c08704fb53d6bcf 100644
--- a/remoting/protocol/ssl_hmac_channel_authenticator.cc
+++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc
@@ -12,6 +12,7 @@
#include "net/base/net_errors.h"
#include "net/cert/cert_verifier.h"
#include "net/cert/x509_certificate.h"
+#include "net/http/transport_security_state.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/ssl_client_socket.h"
#include "net/socket/ssl_server_socket.h"
@@ -83,6 +84,7 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
&SslHmacChannelAuthenticator::OnConnected, base::Unretained(this)));
} else {
cert_verifier_.reset(net::CertVerifier::CreateDefault());
+ transport_security_state_.reset(new net::TransportSecurityState);
net::SSLConfig::CertAndStatus cert_and_status;
cert_and_status.cert_status = net::CERT_STATUS_AUTHORITY_INVALID;
@@ -100,6 +102,7 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
net::HostPortPair host_and_port(kSslFakeHostName, 0);
net::SSLClientSocketContext context;
context.cert_verifier = cert_verifier_.get();
+ context.transport_security_state = transport_security_state_.get();
socket_.reset(
net::ClientSocketFactory::GetDefaultFactory()->CreateSSLClientSocket(
socket.release(), host_and_port, ssl_config, context));
« no previous file with comments | « remoting/protocol/ssl_hmac_channel_authenticator.h ('k') | webkit/support/test_shell_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698