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

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

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_host_authenticator.h" 5 #include "remoting/protocol/negotiating_host_authenticator.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"
(...skipping 23 matching lines...) Expand all
34 const std::string& local_cert, 34 const std::string& local_cert,
35 scoped_refptr<RsaKeyPair> key_pair, 35 scoped_refptr<RsaKeyPair> key_pair,
36 const std::string& shared_secret_hash, 36 const std::string& shared_secret_hash,
37 AuthenticationMethod::HashFunction hash_function, 37 AuthenticationMethod::HashFunction hash_function,
38 scoped_refptr<PairingRegistry> pairing_registry) { 38 scoped_refptr<PairingRegistry> pairing_registry) {
39 scoped_ptr<NegotiatingHostAuthenticator> result( 39 scoped_ptr<NegotiatingHostAuthenticator> result(
40 new NegotiatingHostAuthenticator(local_cert, key_pair)); 40 new NegotiatingHostAuthenticator(local_cert, key_pair));
41 result->shared_secret_hash_ = shared_secret_hash; 41 result->shared_secret_hash_ = shared_secret_hash;
42 result->pairing_registry_ = pairing_registry; 42 result->pairing_registry_ = pairing_registry;
43 result->AddMethod(AuthenticationMethod::Spake2(hash_function)); 43 result->AddMethod(AuthenticationMethod::Spake2(hash_function));
44 if (pairing_registry) { 44 if (pairing_registry.get()) {
45 result->AddMethod(AuthenticationMethod::Spake2Pair()); 45 result->AddMethod(AuthenticationMethod::Spake2Pair());
46 } 46 }
47 return scoped_ptr<Authenticator>(result.Pass()); 47 return scoped_ptr<Authenticator>(result.Pass());
48 } 48 }
49 49
50 // static 50 // static
51 scoped_ptr<Authenticator> 51 scoped_ptr<Authenticator>
52 NegotiatingHostAuthenticator::CreateWithThirdPartyAuth( 52 NegotiatingHostAuthenticator::CreateWithThirdPartyAuth(
53 const std::string& local_cert, 53 const std::string& local_cert,
54 scoped_refptr<RsaKeyPair> key_pair, 54 scoped_refptr<RsaKeyPair> key_pair,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 current_method_.type() == AuthenticationMethod::SPAKE2_PAIR); 180 current_method_.type() == AuthenticationMethod::SPAKE2_PAIR);
181 current_authenticator_ = V2Authenticator::CreateForHost( 181 current_authenticator_ = V2Authenticator::CreateForHost(
182 local_cert_, local_key_pair_, shared_secret_hash_, 182 local_cert_, local_key_pair_, shared_secret_hash_,
183 preferred_initial_state); 183 preferred_initial_state);
184 } 184 }
185 resume_callback.Run(); 185 resume_callback.Run();
186 } 186 }
187 187
188 } // namespace protocol 188 } // namespace protocol
189 } // namespace remoting 189 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/negotiating_authenticator_unittest.cc ('k') | remoting/protocol/ssl_hmac_channel_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698