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 #ifndef REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_ |
6 #define REMOTING_PROTOCOL_V2_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 |
(...skipping 16 matching lines...) Expand all Loading... |
27 static scoped_ptr<Authenticator> CreateForClient( | 27 static scoped_ptr<Authenticator> CreateForClient( |
28 const std::string& shared_secret, | 28 const std::string& shared_secret, |
29 State initial_state); | 29 State initial_state); |
30 | 30 |
31 static scoped_ptr<Authenticator> CreateForHost( | 31 static scoped_ptr<Authenticator> CreateForHost( |
32 const std::string& local_cert, | 32 const std::string& local_cert, |
33 scoped_refptr<RsaKeyPair> key_pair, | 33 scoped_refptr<RsaKeyPair> key_pair, |
34 const std::string& shared_secret, | 34 const std::string& shared_secret, |
35 State initial_state); | 35 State initial_state); |
36 | 36 |
37 virtual ~V2Authenticator(); | 37 ~V2Authenticator() override; |
38 | 38 |
39 // Authenticator interface. | 39 // Authenticator interface. |
40 virtual State state() const override; | 40 State state() const override; |
41 virtual bool started() const override; | 41 bool started() const override; |
42 virtual RejectionReason rejection_reason() const override; | 42 RejectionReason rejection_reason() const override; |
43 virtual void ProcessMessage(const buzz::XmlElement* message, | 43 void ProcessMessage(const buzz::XmlElement* message, |
44 const base::Closure& resume_callback) override; | 44 const base::Closure& resume_callback) override; |
45 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; | 45 scoped_ptr<buzz::XmlElement> GetNextMessage() override; |
46 virtual scoped_ptr<ChannelAuthenticator> | 46 scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; |
47 CreateChannelAuthenticator() const override; | |
48 | 47 |
49 private: | 48 private: |
50 FRIEND_TEST_ALL_PREFIXES(V2AuthenticatorTest, InvalidSecret); | 49 FRIEND_TEST_ALL_PREFIXES(V2AuthenticatorTest, InvalidSecret); |
51 | 50 |
52 V2Authenticator(crypto::P224EncryptedKeyExchange::PeerType type, | 51 V2Authenticator(crypto::P224EncryptedKeyExchange::PeerType type, |
53 const std::string& shared_secret, | 52 const std::string& shared_secret, |
54 State initial_state); | 53 State initial_state); |
55 | 54 |
56 virtual void ProcessMessageInternal(const buzz::XmlElement* message); | 55 virtual void ProcessMessageInternal(const buzz::XmlElement* message); |
57 | 56 |
(...skipping 15 matching lines...) Expand all Loading... |
73 std::queue<std::string> pending_messages_; | 72 std::queue<std::string> pending_messages_; |
74 std::string auth_key_; | 73 std::string auth_key_; |
75 | 74 |
76 DISALLOW_COPY_AND_ASSIGN(V2Authenticator); | 75 DISALLOW_COPY_AND_ASSIGN(V2Authenticator); |
77 }; | 76 }; |
78 | 77 |
79 } // namespace protocol | 78 } // namespace protocol |
80 } // namespace remoting | 79 } // namespace remoting |
81 | 80 |
82 #endif // REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_ | 81 #endif // REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_ |
OLD | NEW |