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

Unified Diff: remoting/protocol/me2me_host_authenticator_factory.cc

Issue 12316083: Move HostKeyPair into protocol::KeyPair. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add missing files, move TestKeyPair. Created 7 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
Index: remoting/protocol/me2me_host_authenticator_factory.cc
diff --git a/remoting/protocol/me2me_host_authenticator_factory.cc b/remoting/protocol/me2me_host_authenticator_factory.cc
index ad813f776dc6b741112a91505842f3d7b4198e92..754ace6e7cba84a5e045b85ec0b1043161633afd 100644
--- a/remoting/protocol/me2me_host_authenticator_factory.cc
+++ b/remoting/protocol/me2me_host_authenticator_factory.cc
@@ -6,8 +6,8 @@
#include "base/base64.h"
#include "base/string_util.h"
-#include "crypto/rsa_private_key.h"
#include "remoting/protocol/channel_authenticator.h"
+#include "remoting/protocol/key_pair.h"
#include "remoting/protocol/negotiating_authenticator.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
@@ -58,10 +58,10 @@ class RejectingAuthenticator : public Authenticator {
Me2MeHostAuthenticatorFactory::Me2MeHostAuthenticatorFactory(
const std::string& local_cert,
- const crypto::RSAPrivateKey& local_private_key,
+ scoped_ptr<KeyPair> key_pair,
const SharedSecretHash& shared_secret_hash)
: local_cert_(local_cert),
- local_private_key_(local_private_key.Copy()),
+ key_pair_(key_pair.Pass()),
shared_secret_hash_(shared_secret_hash) {
}
@@ -90,7 +90,7 @@ scoped_ptr<Authenticator> Me2MeHostAuthenticatorFactory::CreateAuthenticator(
}
return NegotiatingAuthenticator::CreateForHost(
- local_cert_, *local_private_key_, shared_secret_hash_.value,
+ local_cert_, key_pair_->Copy(), shared_secret_hash_.value,
shared_secret_hash_.hash_function);
}

Powered by Google App Engine
This is Rietveld 408576698