Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: remoting/protocol/negotiating_authenticator_base.cc

Issue 1780403002: Enable Curve25519 in host and client for PIN-based and third-party auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/rsa_key_pair.h" 14 #include "remoting/base/rsa_key_pair.h"
15 #include "remoting/protocol/channel_authenticator.h" 15 #include "remoting/protocol/channel_authenticator.h"
16 #include "remoting/protocol/name_value_map.h" 16 #include "remoting/protocol/name_value_map.h"
17 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 17 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
18 18
19 namespace remoting { 19 namespace remoting {
20 namespace protocol { 20 namespace protocol {
21 21
22 namespace { 22 namespace {
23 23
24 const NameMapElement<NegotiatingAuthenticatorBase::Method> 24 const NameMapElement<NegotiatingAuthenticatorBase::Method>
25 kAuthenticationMethodStrings[] = { 25 kAuthenticationMethodStrings[] = {
26 {NegotiatingAuthenticatorBase::Method::SPAKE2_SHARED_SECRET_PLAIN, 26 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_PLAIN_SPAKE2_P224,
27 "spake2_plain"}, 27 "spake2_plain"},
28 {NegotiatingAuthenticatorBase::Method::SPAKE2_SHARED_SECRET_HMAC, 28
29 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_SPAKE2_P224,
29 "spake2_hmac"}, 30 "spake2_hmac"},
30 {NegotiatingAuthenticatorBase::Method::SPAKE2_PAIR, "spake2_pair"}, 31 {NegotiatingAuthenticatorBase::Method::SHARED_SECRET_SPAKE2_CURVE25519,
31 {NegotiatingAuthenticatorBase::Method::THIRD_PARTY, "third_party"}, 32 "spake2_curve25519"},
33
34 {NegotiatingAuthenticatorBase::Method::PAIRED_SPAKE2_P224,
35 "spake2_pair"},
36
37 {NegotiatingAuthenticatorBase::Method::THIRD_PARTY_SPAKE2_P224,
38 "third_party"},
39 {NegotiatingAuthenticatorBase::Method::THIRD_PARTY_SPAKE2_CURVE25519,
40 "third_party_spake2_curve25519"},
32 }; 41 };
33 42
34 } // namespace 43 } // namespace
35 44
36 const buzz::StaticQName NegotiatingAuthenticatorBase::kMethodAttributeQName = 45 const buzz::StaticQName NegotiatingAuthenticatorBase::kMethodAttributeQName =
37 { "", "method" }; 46 { "", "method" };
38 const buzz::StaticQName 47 const buzz::StaticQName
39 NegotiatingAuthenticatorBase::kSupportedMethodsAttributeQName = 48 NegotiatingAuthenticatorBase::kSupportedMethodsAttributeQName =
40 { "", "supported-methods" }; 49 { "", "supported-methods" };
41 const char NegotiatingAuthenticatorBase::kSupportedMethodsSeparator = ','; 50 const char NegotiatingAuthenticatorBase::kSupportedMethodsSeparator = ',';
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 141 }
133 142
134 scoped_ptr<ChannelAuthenticator> 143 scoped_ptr<ChannelAuthenticator>
135 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const { 144 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const {
136 DCHECK_EQ(state(), ACCEPTED); 145 DCHECK_EQ(state(), ACCEPTED);
137 return current_authenticator_->CreateChannelAuthenticator(); 146 return current_authenticator_->CreateChannelAuthenticator();
138 } 147 }
139 148
140 } // namespace protocol 149 } // namespace protocol
141 } // namespace remoting 150 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/negotiating_authenticator_base.h ('k') | remoting/protocol/negotiating_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698