| 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_base.h" | 5 #include "remoting/protocol/negotiating_authenticator_base.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
| 14 #include "remoting/base/constants.h" | 14 #include "remoting/base/constants.h" |
| 15 #include "remoting/base/rsa_key_pair.h" | 15 #include "remoting/base/rsa_key_pair.h" |
| 16 #include "remoting/protocol/channel_authenticator.h" | 16 #include "remoting/protocol/channel_authenticator.h" |
| 17 #include "remoting/protocol/name_value_map.h" | 17 #include "remoting/protocol/name_value_map.h" |
| 18 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 18 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
| 19 | 19 |
| 20 namespace remoting { | 20 namespace remoting { |
| 21 namespace protocol { | 21 namespace protocol { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const NameMapElement<NegotiatingAuthenticatorBase::Method> | 25 const NameMapElement<NegotiatingAuthenticatorBase::Method> |
| 26 kAuthenticationMethodStrings[] = { | 26 kAuthenticationMethodStrings[] = { |
| 27 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_PLAIN_SPAKE2_P224, | |
| 28 "spake2_plain"}, | |
| 29 | |
| 30 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_SPAKE2_P224, | 27 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_SPAKE2_P224, |
| 31 "spake2_hmac"}, | 28 "spake2_hmac"}, |
| 32 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_SPAKE2_CURVE25519, | 29 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_SPAKE2_CURVE25519, |
| 33 "spake2_curve25519"}, | 30 "spake2_curve25519"}, |
| 34 | 31 |
| 35 {NegotiatingAuthenticatorBase::Method::PAIRED_SPAKE2_P224, | 32 {NegotiatingAuthenticatorBase::Method::PAIRED_SPAKE2_P224, |
| 36 "spake2_pair"}, | 33 "spake2_pair"}, |
| 37 {NegotiatingAuthenticatorBase::Method::PAIRED_SPAKE2_CURVE25519, | 34 {NegotiatingAuthenticatorBase::Method::PAIRED_SPAKE2_CURVE25519, |
| 38 "pair_spake2_curve25519"}, | 35 "pair_spake2_curve25519"}, |
| 39 | 36 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 155 } |
| 159 | 156 |
| 160 scoped_ptr<ChannelAuthenticator> | 157 scoped_ptr<ChannelAuthenticator> |
| 161 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const { | 158 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const { |
| 162 DCHECK_EQ(state(), ACCEPTED); | 159 DCHECK_EQ(state(), ACCEPTED); |
| 163 return current_authenticator_->CreateChannelAuthenticator(); | 160 return current_authenticator_->CreateChannelAuthenticator(); |
| 164 } | 161 } |
| 165 | 162 |
| 166 } // namespace protocol | 163 } // namespace protocol |
| 167 } // namespace remoting | 164 } // namespace remoting |
| OLD | NEW |