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

Unified Diff: remoting/protocol/v2_authenticator.cc

Issue 9150014: Cleanup AuthenticatorFactory implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 years, 11 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 0e78098f8c0825e7dd60e9dac2191939057373bb..3932a95cc75b9c75c4975e33237c6d1b92b114b5 100644
--- a/remoting/protocol/v2_authenticator.cc
+++ b/remoting/protocol/v2_authenticator.cc
@@ -44,12 +44,12 @@ V2Authenticator* V2Authenticator::CreateForClient(
// static
V2Authenticator* V2Authenticator::CreateForHost(
const std::string& local_cert,
- crypto::RSAPrivateKey* local_private_key,
+ const crypto::RSAPrivateKey& local_private_key,
const std::string& shared_secret) {
V2Authenticator* result = new V2Authenticator(
P224EncryptedKeyExchange::kPeerTypeServer, shared_secret);
result->local_cert_ = local_cert;
- result->local_private_key_.reset(local_private_key->Copy());
+ result->local_private_key_.reset(local_private_key.Copy());
result->state_ = WAITING_MESSAGE;
return result;
}
@@ -183,27 +183,5 @@ bool V2Authenticator::is_host_side() const {
return local_private_key_.get() != NULL;
}
-V2HostAuthenticatorFactory::V2HostAuthenticatorFactory(
- const std::string& local_cert,
- const crypto::RSAPrivateKey* local_private_key,
- const std::string& shared_secret)
- : local_cert_(local_cert),
- local_private_key_(local_private_key->Copy()),
- shared_secret_(shared_secret) {
- CHECK(local_private_key_.get());
-}
-
-V2HostAuthenticatorFactory::~V2HostAuthenticatorFactory() {
-}
-
-Authenticator* V2HostAuthenticatorFactory::CreateAuthenticator(
- const std::string& remote_jid,
- const buzz::XmlElement* first_message) {
- if (!V2Authenticator::IsEkeMessage(first_message))
- return NULL;
- return V2Authenticator::CreateForHost(
- local_cert_, local_private_key_.get(), shared_secret_);
-}
-
} // namespace protocol
} // namespace remoting
« 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