OLD | NEW |
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 "remoting/base/rsa_key_pair.h" | 8 #include "remoting/base/rsa_key_pair.h" |
9 #include "remoting/protocol/negotiating_authenticator.h" | 9 #include "remoting/protocol/negotiating_authenticator.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 namespace protocol { | 12 namespace protocol { |
13 | 13 |
14 It2MeHostAuthenticatorFactory::It2MeHostAuthenticatorFactory( | 14 It2MeHostAuthenticatorFactory::It2MeHostAuthenticatorFactory( |
15 const std::string& local_cert, | 15 const std::string& local_cert, |
16 scoped_refptr<RsaKeyPair> key_pair, | 16 scoped_refptr<RsaKeyPair> key_pair, |
17 const std::string& shared_secret) | 17 const std::string& shared_secret) |
18 : local_cert_(local_cert), | 18 : local_cert_(local_cert), |
19 key_pair_(key_pair), | 19 key_pair_(key_pair), |
20 shared_secret_(shared_secret) { | 20 shared_secret_(shared_secret) { |
21 } | 21 } |
22 | 22 |
23 It2MeHostAuthenticatorFactory::~It2MeHostAuthenticatorFactory() { | 23 It2MeHostAuthenticatorFactory::~It2MeHostAuthenticatorFactory() { |
24 } | 24 } |
25 | 25 |
26 scoped_ptr<Authenticator> It2MeHostAuthenticatorFactory::CreateAuthenticator( | 26 scoped_ptr<Authenticator> It2MeHostAuthenticatorFactory::CreateAuthenticator( |
27 const std::string& local_jid, | 27 const std::string& local_jid, |
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 return NegotiatingAuthenticator::CreateForHost( | 30 return NegotiatingAuthenticator::CreateForHostSharedSecret( |
31 local_cert_, key_pair_, shared_secret_, | 31 local_cert_, key_pair_, shared_secret_, |
32 AuthenticationMethod::NONE); | 32 AuthenticationMethod::NONE); |
33 } | 33 } |
34 | 34 |
35 } // namespace protocol | 35 } // namespace protocol |
36 } // namespace remoting | 36 } // namespace remoting |
OLD | NEW |