Index: remoting/protocol/v2_authenticator.cc |
diff --git a/remoting/protocol/v2_authenticator.cc b/remoting/protocol/v2_authenticator.cc |
index 95b42d53270639c2d8f5c92fd41fe6f59ffd469a..b159fc56c6b5668d33a5d7c53c8fb5b16d08ea7d 100644 |
--- a/remoting/protocol/v2_authenticator.cc |
+++ b/remoting/protocol/v2_authenticator.cc |
@@ -6,7 +6,6 @@ |
#include "base/base64.h" |
#include "base/logging.h" |
-#include "crypto/rsa_private_key.h" |
#include "remoting/base/constants.h" |
#include "remoting/protocol/ssl_hmac_channel_authenticator.h" |
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h" |
@@ -45,13 +44,13 @@ scoped_ptr<Authenticator> V2Authenticator::CreateForClient( |
// static |
scoped_ptr<Authenticator> V2Authenticator::CreateForHost( |
const std::string& local_cert, |
- const crypto::RSAPrivateKey& local_private_key, |
+ scoped_ptr<KeyPair> key_pair, |
const std::string& shared_secret, |
Authenticator::State initial_state) { |
scoped_ptr<V2Authenticator> result(new V2Authenticator( |
P224EncryptedKeyExchange::kPeerTypeServer, shared_secret, initial_state)); |
result->local_cert_ = local_cert; |
- result->local_private_key_.reset(local_private_key.Copy()); |
+ result->key_pair_ = key_pair.Pass(); |
return scoped_ptr<Authenticator>(result.Pass()); |
} |
@@ -187,7 +186,7 @@ V2Authenticator::CreateChannelAuthenticator() const { |
if (is_host_side()) { |
return scoped_ptr<ChannelAuthenticator>( |
SslHmacChannelAuthenticator::CreateForHost( |
- local_cert_, local_private_key_.get(), auth_key_).Pass()); |
+ local_cert_, key_pair_->Copy(), auth_key_).Pass()); |
} else { |
return scoped_ptr<ChannelAuthenticator>( |
SslHmacChannelAuthenticator::CreateForClient( |
@@ -196,7 +195,7 @@ V2Authenticator::CreateChannelAuthenticator() const { |
} |
bool V2Authenticator::is_host_side() const { |
- return local_private_key_.get() != NULL; |
+ return key_pair_.get() != NULL; |
} |
} // namespace protocol |