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

Side by Side Diff: remoting/protocol/it2me_host_authenticator_factory.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/it2me_host_authenticator_factory.h" 5 #include "remoting/protocol/it2me_host_authenticator_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "crypto/rsa_private_key.h" 8 #include "crypto/rsa_private_key.h"
9 #include "remoting/protocol/v1_authenticator.h" 9 #include "remoting/protocol/v1_authenticator.h"
10 #include "remoting/protocol/v2_authenticator.h" 10 #include "remoting/protocol/v2_authenticator.h"
11 11
12 namespace remoting { 12 namespace remoting {
13 namespace protocol { 13 namespace protocol {
14 14
15 It2MeHostAuthenticatorFactory::It2MeHostAuthenticatorFactory( 15 It2MeHostAuthenticatorFactory::It2MeHostAuthenticatorFactory(
16 const std::string& local_cert, 16 const std::string& local_cert,
17 const crypto::RSAPrivateKey* local_private_key, 17 const crypto::RSAPrivateKey& local_private_key,
18 const std::string& shared_secret) 18 const std::string& shared_secret)
19 : local_cert_(local_cert), 19 : local_cert_(local_cert),
20 local_private_key_(local_private_key->Copy()), 20 local_private_key_(local_private_key.Copy()),
21 shared_secret_(shared_secret) { 21 shared_secret_(shared_secret) {
22 } 22 }
23 23
24 It2MeHostAuthenticatorFactory::~It2MeHostAuthenticatorFactory() { 24 It2MeHostAuthenticatorFactory::~It2MeHostAuthenticatorFactory() {
25 } 25 }
26 26
27 Authenticator* It2MeHostAuthenticatorFactory::CreateAuthenticator( 27 Authenticator* It2MeHostAuthenticatorFactory::CreateAuthenticator(
28 const std::string& remote_jid, 28 const std::string& remote_jid,
29 const buzz::XmlElement* first_message) { 29 const buzz::XmlElement* first_message) {
30 // TODO(sergeyu): V2 authenticator is not finished yet. Enable it 30 // TODO(sergeyu): V2 authenticator is not finished yet. Enable it
31 // here when it is finished. crbug.com/105214 31 // here when it is finished. crbug.com/105214
32 // 32 //
33 // if (V2Authenticator::IsEkeMessage(first_message)) { 33 // if (V2Authenticator::IsEkeMessage(first_message)) {
34 // return V2Authenticator::CreateForHost( 34 // return V2Authenticator::CreateForHost(
35 // local_cert_, local_private_key_.get(), shared_secret_); 35 // local_cert_, *local_private_key_, shared_secret_);
36 // } 36 // }
37 37
38 return new V1HostAuthenticator(local_cert_, local_private_key_.get(), 38 return new V1HostAuthenticator(local_cert_, *local_private_key_,
39 shared_secret_, remote_jid); 39 shared_secret_, remote_jid);
40 } 40 }
41 41
42 } // namespace protocol 42 } // namespace protocol
43 } // namespace remoting 43 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/it2me_host_authenticator_factory.h ('k') | remoting/protocol/me2me_host_authenticator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698