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

Unified Diff: remoting/protocol/ssl_hmac_channel_authenticator.cc

Issue 1518613002: Support for server session cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client_certs
Patch Set: Fixed nit Created 4 years, 10 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') | no next file » | 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 808bd1b85a5ba0d032a7d1f4e9fbe51aca2d1c82..8fb2e5ea1c0ddc3a5b5fb32ff209de164107740a 100644
--- a/remoting/protocol/ssl_hmac_channel_authenticator.cc
+++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc
@@ -217,8 +217,8 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
result = net::ERR_FAILED;
#else
scoped_refptr<net::X509Certificate> cert =
- net::X509Certificate::CreateFromBytes(
- local_cert_.data(), local_cert_.length());
+ net::X509Certificate::CreateFromBytes(local_cert_.data(),
+ local_cert_.length());
if (!cert.get()) {
LOG(ERROR) << "Failed to parse X509Certificate";
NotifyError(net::ERR_FAILED);
@@ -228,9 +228,12 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
net::SSLServerConfig ssl_config;
ssl_config.require_ecdhe = true;
- scoped_ptr<net::SSLServerSocket> server_socket = net::CreateSSLServerSocket(
- make_scoped_ptr(new NetStreamSocketAdapter(std::move(socket))),
+ server_context_ = net::CreateSSLServerContext(
Sergey Ulanov 2016/03/04 20:37:25 Does server_context_ need to be a class member ins
davidben 2016/03/04 20:56:55 The socket shouldn't outlive the context. (It's no
Sergey Ulanov 2016/03/04 21:35:31 So then this code will not work correctly. SslHmac
davidben 2016/03/04 21:45:53 Oh, that's annoying. Reference-counting is viral
davidben 2016/03/04 21:48:04 Oh, I probably should have elaborated here: you ca
Sergey Ulanov 2016/03/04 22:34:07 We have P2PStreamSocketAdapter that takes ownershi
ryanchung 2016/03/04 23:31:23 Done. I've added server_context_ to P2PStreamSocke
cert.get(), *local_key_pair_->private_key(), ssl_config);
+
+ scoped_ptr<net::SSLServerSocket> server_socket =
+ server_context_->CreateSSLServerSocket(
+ make_scoped_ptr(new NetStreamSocketAdapter(std::move(socket))));
net::SSLServerSocket* raw_server_socket = server_socket.get();
socket_ = std::move(server_socket);
result = raw_server_socket->Handshake(
« no previous file with comments | « remoting/protocol/ssl_hmac_channel_authenticator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698