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

Unified Diff: remoting/protocol/v2_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
« no previous file with comments | « remoting/protocol/v2_authenticator.h ('k') | remoting/protocol/v2_authenticator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/v2_authenticator.cc
diff --git a/remoting/protocol/v2_authenticator.cc b/remoting/protocol/v2_authenticator.cc
index 3728a6a0f493376449ce7c999fa9ad68d30160aa..80f7af3d5c8ad7a5cc3997ce13f979fa17ed7091 100644
--- a/remoting/protocol/v2_authenticator.cc
+++ b/remoting/protocol/v2_authenticator.cc
@@ -6,8 +6,8 @@
#include "base/base64.h"
#include "base/logging.h"
-#include "crypto/rsa_private_key.h"
#include "remoting/base/constants.h"
+#include "remoting/base/rsa_key_pair.h"
#include "remoting/protocol/ssl_hmac_channel_authenticator.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
@@ -45,13 +45,13 @@ scoped_ptr<Authenticator> V2Authenticator::CreateForClient(
// static
scoped_ptr<Authenticator> V2Authenticator::CreateForHost(
const std::string& local_cert,
- const crypto::RSAPrivateKey& local_private_key,
+ scoped_refptr<RsaKeyPair> 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->local_key_pair_ = key_pair;
return scoped_ptr<Authenticator>(result.Pass());
}
@@ -193,7 +193,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_, local_key_pair_, auth_key_).Pass());
} else {
return scoped_ptr<ChannelAuthenticator>(
SslHmacChannelAuthenticator::CreateForClient(
@@ -202,7 +202,7 @@ V2Authenticator::CreateChannelAuthenticator() const {
}
bool V2Authenticator::is_host_side() const {
- return local_private_key_.get() != NULL;
+ return local_key_pair_.get() != NULL;
}
} // namespace protocol
« no previous file with comments | « remoting/protocol/v2_authenticator.h ('k') | remoting/protocol/v2_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698