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

Unified Diff: remoting/protocol/ssl_hmac_channel_authenticator.cc

Issue 12316083: Move HostKeyPair into protocol::KeyPair. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 9 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
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 2cfb3b4b5450c99e9843e57cb1d22bc4611d60a8..6285d579974d3bdb98ac2bdd9acb3908704bc682 100644
--- a/remoting/protocol/ssl_hmac_channel_authenticator.cc
+++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc
@@ -16,6 +16,7 @@
#include "net/socket/client_socket_factory.h"
#include "net/socket/ssl_client_socket.h"
#include "net/socket/ssl_server_socket.h"
+#include "remoting/base/rsa_key_pair.h"
#include "remoting/protocol/auth_util.h"
namespace remoting {
@@ -35,19 +36,18 @@ SslHmacChannelAuthenticator::CreateForClient(
scoped_ptr<SslHmacChannelAuthenticator>
SslHmacChannelAuthenticator::CreateForHost(
const std::string& local_cert,
- crypto::RSAPrivateKey* local_private_key,
+ scoped_refptr<RsaKeyPair> key_pair,
const std::string& auth_key) {
scoped_ptr<SslHmacChannelAuthenticator> result(
new SslHmacChannelAuthenticator(auth_key));
result->local_cert_ = local_cert;
- result->local_private_key_ = local_private_key;
+ result->local_key_pair_ = key_pair;
return result.Pass();
}
SslHmacChannelAuthenticator::SslHmacChannelAuthenticator(
const std::string& auth_key)
- : auth_key_(auth_key),
- local_private_key_(NULL) {
+ : auth_key_(auth_key) {
}
SslHmacChannelAuthenticator::~SslHmacChannelAuthenticator() {
@@ -73,7 +73,7 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
net::SSLConfig ssl_config;
net::SSLServerSocket* server_socket = net::CreateSSLServerSocket(
- socket.release(), cert, local_private_key_, ssl_config);
+ socket.release(), cert, local_key_pair_->private_key(), ssl_config);
socket_.reset(server_socket);
result = server_socket->Handshake(base::Bind(
@@ -113,7 +113,7 @@ void SslHmacChannelAuthenticator::SecureAndAuthenticate(
}
bool SslHmacChannelAuthenticator::is_ssl_server() {
- return local_private_key_ != NULL;
+ return local_key_pair_.get() != NULL;
}
void SslHmacChannelAuthenticator::OnConnected(int result) {
« no previous file with comments | « remoting/protocol/ssl_hmac_channel_authenticator.h ('k') | remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698