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

Side by Side Diff: remoting/protocol/v2_authenticator.h

Issue 9158003: Added Me2Me-specific authenticator factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef REMOTING_PROTOCOL_EKE_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_EKE_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <queue> 9 #include <queue>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "crypto/p224_spake.h" 14 #include "crypto/p224_spake.h"
15 #include "remoting/protocol/authenticator.h" 15 #include "remoting/protocol/authenticator.h"
16 16
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 std::queue<std::string> pending_messages_; 63 std::queue<std::string> pending_messages_;
64 std::string auth_key_; 64 std::string auth_key_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(V2Authenticator); 66 DISALLOW_COPY_AND_ASSIGN(V2Authenticator);
67 }; 67 };
68 68
69 class V2HostAuthenticatorFactory : public AuthenticatorFactory { 69 class V2HostAuthenticatorFactory : public AuthenticatorFactory {
70 public: 70 public:
71 // Doesn't take ownership of |local_private_key|. 71 // Doesn't take ownership of |local_private_key|.
72 V2HostAuthenticatorFactory(const std::string& local_cert, 72 V2HostAuthenticatorFactory(const std::string& local_cert,
73 const crypto::RSAPrivateKey* local_private_key, 73 const crypto::RSAPrivateKey* local_private_key,
74 const std::string& shared_secret); 74 const std::string& shared_secret);
75 virtual ~V2HostAuthenticatorFactory(); 75 virtual ~V2HostAuthenticatorFactory();
76 76
77 // AuthenticatorFactory interface. 77 // AuthenticatorFactory interface.
78 virtual Authenticator* CreateAuthenticator( 78 virtual Authenticator* CreateAuthenticator(
79 const std::string& remote_jid, 79 const std::string& remote_jid,
80 const buzz::XmlElement* first_message) OVERRIDE; 80 const buzz::XmlElement* first_message) OVERRIDE;
81 81
82 private: 82 private:
83 std::string local_cert_; 83 std::string local_cert_;
84 scoped_ptr<crypto::RSAPrivateKey> local_private_key_; 84 scoped_ptr<crypto::RSAPrivateKey> local_private_key_;
85 std::string shared_secret_; 85 std::string shared_secret_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(V2HostAuthenticatorFactory); 87 DISALLOW_COPY_AND_ASSIGN(V2HostAuthenticatorFactory);
88 }; 88 };
89 89
90 } // namespace protocol 90 } // namespace protocol
91 } // namespace remoting 91 } // namespace remoting
92 92
93 #endif // REMOTING_PROTOCOL_EKE_AUTHENTICATOR_H_ 93 #endif // REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698