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

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

Issue 966433002: Malformed PortRange or ThirdPartyAuthConfig trigger OnPolicyError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 scoped_ptr<Me2MeHostAuthenticatorFactory> result( 90 scoped_ptr<Me2MeHostAuthenticatorFactory> result(
91 new Me2MeHostAuthenticatorFactory()); 91 new Me2MeHostAuthenticatorFactory());
92 result->use_service_account_ = use_service_account; 92 result->use_service_account_ = use_service_account;
93 result->host_owner_ = host_owner; 93 result->host_owner_ = host_owner;
94 result->local_cert_ = local_cert; 94 result->local_cert_ = local_cert;
95 result->key_pair_ = key_pair; 95 result->key_pair_ = key_pair;
96 result->token_validator_factory_ = token_validator_factory.Pass(); 96 result->token_validator_factory_ = token_validator_factory.Pass();
97 return result.Pass(); 97 return result.Pass();
98 } 98 }
99 99
100 // static
101 scoped_ptr<AuthenticatorFactory>
102 Me2MeHostAuthenticatorFactory::CreateRejecting() {
103 return make_scoped_ptr(new Me2MeHostAuthenticatorFactory());
104 }
105
106 Me2MeHostAuthenticatorFactory::Me2MeHostAuthenticatorFactory() { 100 Me2MeHostAuthenticatorFactory::Me2MeHostAuthenticatorFactory() {
107 } 101 }
108 102
109 Me2MeHostAuthenticatorFactory::~Me2MeHostAuthenticatorFactory() { 103 Me2MeHostAuthenticatorFactory::~Me2MeHostAuthenticatorFactory() {
110 } 104 }
111 105
112 scoped_ptr<Authenticator> Me2MeHostAuthenticatorFactory::CreateAuthenticator( 106 scoped_ptr<Authenticator> Me2MeHostAuthenticatorFactory::CreateAuthenticator(
113 const std::string& local_jid, 107 const std::string& local_jid,
114 const std::string& remote_jid, 108 const std::string& remote_jid,
115 const buzz::XmlElement* first_message) { 109 const buzz::XmlElement* first_message) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return NegotiatingHostAuthenticator::CreateWithSharedSecret( 146 return NegotiatingHostAuthenticator::CreateWithSharedSecret(
153 local_cert_, key_pair_, shared_secret_hash_.value, 147 local_cert_, key_pair_, shared_secret_hash_.value,
154 shared_secret_hash_.hash_function, pairing_registry_); 148 shared_secret_hash_.hash_function, pairing_registry_);
155 } 149 }
156 150
157 return make_scoped_ptr(new RejectingAuthenticator()); 151 return make_scoped_ptr(new RejectingAuthenticator());
158 } 152 }
159 153
160 } // namespace protocol 154 } // namespace protocol
161 } // namespace remoting 155 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698