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/me2me_host_authenticator_factory.h" | 5 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "remoting/base/rsa_key_pair.h" | 9 #include "remoting/base/rsa_key_pair.h" |
10 #include "remoting/protocol/channel_authenticator.h" | 10 #include "remoting/protocol/channel_authenticator.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 DCHECK_EQ(state_, WAITING_MESSAGE); | 40 DCHECK_EQ(state_, WAITING_MESSAGE); |
41 state_ = REJECTED; | 41 state_ = REJECTED; |
42 resume_callback.Run(); | 42 resume_callback.Run(); |
43 } | 43 } |
44 | 44 |
45 scoped_ptr<buzz::XmlElement> GetNextMessage() override { | 45 scoped_ptr<buzz::XmlElement> GetNextMessage() override { |
46 NOTREACHED(); | 46 NOTREACHED(); |
47 return nullptr; | 47 return nullptr; |
48 } | 48 } |
49 | 49 |
| 50 const std::string& GetAuthKey() const override { |
| 51 NOTREACHED(); |
| 52 return auth_key_; |
| 53 }; |
| 54 |
50 scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override { | 55 scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override { |
51 NOTREACHED(); | 56 NOTREACHED(); |
52 return nullptr; | 57 return nullptr; |
53 } | 58 } |
54 | 59 |
55 protected: | 60 protected: |
56 State state_; | 61 State state_; |
| 62 std::string auth_key_; |
57 }; | 63 }; |
58 | 64 |
59 } // namespace | 65 } // namespace |
60 | 66 |
61 // static | 67 // static |
62 scoped_ptr<AuthenticatorFactory> | 68 scoped_ptr<AuthenticatorFactory> |
63 Me2MeHostAuthenticatorFactory::CreateWithSharedSecret( | 69 Me2MeHostAuthenticatorFactory::CreateWithSharedSecret( |
64 bool use_service_account, | 70 bool use_service_account, |
65 const std::string& host_owner, | 71 const std::string& host_owner, |
66 const std::string& local_cert, | 72 const std::string& local_cert, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 return NegotiatingHostAuthenticator::CreateWithSharedSecret( | 152 return NegotiatingHostAuthenticator::CreateWithSharedSecret( |
147 local_cert_, key_pair_, shared_secret_hash_.value, | 153 local_cert_, key_pair_, shared_secret_hash_.value, |
148 shared_secret_hash_.hash_function, pairing_registry_); | 154 shared_secret_hash_.hash_function, pairing_registry_); |
149 } | 155 } |
150 | 156 |
151 return make_scoped_ptr(new RejectingAuthenticator()); | 157 return make_scoped_ptr(new RejectingAuthenticator()); |
152 } | 158 } |
153 | 159 |
154 } // namespace protocol | 160 } // namespace protocol |
155 } // namespace remoting | 161 } // namespace remoting |
OLD | NEW |