| 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/negotiating_authenticator.h" | 5 #include "remoting/protocol/negotiating_authenticator.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 result->shared_secret_hash_ = shared_secret_hash; | 65 result->shared_secret_hash_ = shared_secret_hash; |
| 66 | 66 |
| 67 result->AddMethod(AuthenticationMethod::Spake2(hash_function)); | 67 result->AddMethod(AuthenticationMethod::Spake2(hash_function)); |
| 68 | 68 |
| 69 return scoped_ptr<Authenticator>(result.Pass()); | 69 return scoped_ptr<Authenticator>(result.Pass()); |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 NegotiatingAuthenticator::NegotiatingAuthenticator( | 73 NegotiatingAuthenticator::NegotiatingAuthenticator( |
| 74 Authenticator::State initial_state) | 74 Authenticator::State initial_state) |
| 75 : current_method_(AuthenticationMethod::Invalid()), | 75 : certificate_sent_(false), |
| 76 current_method_(AuthenticationMethod::Invalid()), |
| 76 state_(initial_state), | 77 state_(initial_state), |
| 77 rejection_reason_(INVALID_CREDENTIALS) { | 78 rejection_reason_(INVALID_CREDENTIALS) { |
| 78 } | 79 } |
| 79 | 80 |
| 80 NegotiatingAuthenticator::~NegotiatingAuthenticator() { | 81 NegotiatingAuthenticator::~NegotiatingAuthenticator() { |
| 81 } | 82 } |
| 82 | 83 |
| 83 Authenticator::State NegotiatingAuthenticator::state() const { | 84 Authenticator::State NegotiatingAuthenticator::state() const { |
| 84 return state_; | 85 return state_; |
| 85 } | 86 } |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 current_authenticator_ = V2Authenticator::CreateForClient( | 221 current_authenticator_ = V2Authenticator::CreateForClient( |
| 221 AuthenticationMethod::ApplyHashFunction( | 222 AuthenticationMethod::ApplyHashFunction( |
| 222 current_method_.hash_function(), | 223 current_method_.hash_function(), |
| 223 authentication_tag_, shared_secret_), | 224 authentication_tag_, shared_secret_), |
| 224 initial_state); | 225 initial_state); |
| 225 } | 226 } |
| 226 } | 227 } |
| 227 | 228 |
| 228 } // namespace protocol | 229 } // namespace protocol |
| 229 } // namespace remoting | 230 } // namespace remoting |
| OLD | NEW |