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

Side by Side Diff: remoting/protocol/ssl_hmac_channel_authenticator.cc

Issue 135373002: Added SSLHostInfo. Storing of server host info to our standard disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed wtc's comments Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« net/http/http_cache.h ('K') | « net/socket_stream/socket_stream.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/ssl_hmac_channel_authenticator.h" 5 #include "remoting/protocol/ssl_hmac_channel_authenticator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "crypto/secure_util.h" 9 #include "crypto/secure_util.h"
10 #include "net/base/host_port_pair.h" 10 #include "net/base/host_port_pair.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 ssl_config.allowed_bad_certs.push_back(cert_and_status); 104 ssl_config.allowed_bad_certs.push_back(cert_and_status);
105 105
106 net::HostPortPair host_and_port(kSslFakeHostName, 0); 106 net::HostPortPair host_and_port(kSslFakeHostName, 0);
107 net::SSLClientSocketContext context; 107 net::SSLClientSocketContext context;
108 context.cert_verifier = cert_verifier_.get(); 108 context.cert_verifier = cert_verifier_.get();
109 context.transport_security_state = transport_security_state_.get(); 109 context.transport_security_state = transport_security_state_.get();
110 scoped_ptr<net::ClientSocketHandle> connection(new net::ClientSocketHandle); 110 scoped_ptr<net::ClientSocketHandle> connection(new net::ClientSocketHandle);
111 connection->SetSocket(socket.Pass()); 111 connection->SetSocket(socket.Pass());
112 socket_ = 112 socket_ =
113 net::ClientSocketFactory::GetDefaultFactory()->CreateSSLClientSocket( 113 net::ClientSocketFactory::GetDefaultFactory()->CreateSSLClientSocket(
114 connection.Pass(), host_and_port, ssl_config, context); 114 connection.Pass(), host_and_port, ssl_config, NULL, context);
115 115
116 result = socket_->Connect( 116 result = socket_->Connect(
117 base::Bind(&SslHmacChannelAuthenticator::OnConnected, 117 base::Bind(&SslHmacChannelAuthenticator::OnConnected,
118 base::Unretained(this))); 118 base::Unretained(this)));
119 } 119 }
120 120
121 if (result == net::ERR_IO_PENDING) 121 if (result == net::ERR_IO_PENDING)
122 return; 122 return;
123 123
124 OnConnected(result); 124 OnConnected(result);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 } 271 }
272 272
273 void SslHmacChannelAuthenticator::NotifyError(int error) { 273 void SslHmacChannelAuthenticator::NotifyError(int error) {
274 done_callback_.Run(static_cast<net::Error>(error), 274 done_callback_.Run(static_cast<net::Error>(error),
275 scoped_ptr<net::StreamSocket>()); 275 scoped_ptr<net::StreamSocket>());
276 } 276 }
277 277
278 } // namespace protocol 278 } // namespace protocol
279 } // namespace remoting 279 } // namespace remoting
OLDNEW
« net/http/http_cache.h ('K') | « net/socket_stream/socket_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698