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 12 matching lines...) Expand all Loading... |
23 RejectingAuthenticator() | 23 RejectingAuthenticator() |
24 : state_(WAITING_MESSAGE) { | 24 : state_(WAITING_MESSAGE) { |
25 } | 25 } |
26 virtual ~RejectingAuthenticator() { | 26 virtual ~RejectingAuthenticator() { |
27 } | 27 } |
28 | 28 |
29 virtual State state() const OVERRIDE { | 29 virtual State state() const OVERRIDE { |
30 return state_; | 30 return state_; |
31 } | 31 } |
32 | 32 |
| 33 virtual bool has_auth_started() const OVERRIDE { |
| 34 return false; |
| 35 } |
| 36 |
33 virtual RejectionReason rejection_reason() const OVERRIDE { | 37 virtual RejectionReason rejection_reason() const OVERRIDE { |
34 DCHECK_EQ(state_, REJECTED); | 38 DCHECK_EQ(state_, REJECTED); |
35 return INVALID_CREDENTIALS; | 39 return INVALID_CREDENTIALS; |
36 } | 40 } |
37 | 41 |
38 virtual void ProcessMessage(const buzz::XmlElement* message, | 42 virtual void ProcessMessage(const buzz::XmlElement* message, |
39 const base::Closure& resume_callback) OVERRIDE { | 43 const base::Closure& resume_callback) OVERRIDE { |
40 DCHECK_EQ(state_, WAITING_MESSAGE); | 44 DCHECK_EQ(state_, WAITING_MESSAGE); |
41 state_ = REJECTED; | 45 state_ = REJECTED; |
42 resume_callback.Run(); | 46 resume_callback.Run(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 return NegotiatingHostAuthenticator::CreateWithSharedSecret( | 158 return NegotiatingHostAuthenticator::CreateWithSharedSecret( |
155 local_cert_, key_pair_, shared_secret_hash_.value, | 159 local_cert_, key_pair_, shared_secret_hash_.value, |
156 shared_secret_hash_.hash_function, pairing_registry_); | 160 shared_secret_hash_.hash_function, pairing_registry_); |
157 } | 161 } |
158 | 162 |
159 return scoped_ptr<Authenticator>(new RejectingAuthenticator()); | 163 return scoped_ptr<Authenticator>(new RejectingAuthenticator()); |
160 } | 164 } |
161 | 165 |
162 } // namespace protocol | 166 } // namespace protocol |
163 } // namespace remoting | 167 } // namespace remoting |
OLD | NEW |