| 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_NEGOTIATING_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_H_ |
| 6 #define REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_H_ | 6 #define REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Authenticator interface. | 40 // Authenticator interface. |
| 41 virtual State state() const OVERRIDE; | 41 virtual State state() const OVERRIDE; |
| 42 virtual RejectionReason rejection_reason() const OVERRIDE; | 42 virtual RejectionReason rejection_reason() const OVERRIDE; |
| 43 virtual void ProcessMessage(const buzz::XmlElement* message) OVERRIDE; | 43 virtual void ProcessMessage(const buzz::XmlElement* message) OVERRIDE; |
| 44 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE; | 44 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE; |
| 45 virtual scoped_ptr<ChannelAuthenticator> | 45 virtual scoped_ptr<ChannelAuthenticator> |
| 46 CreateChannelAuthenticator() const OVERRIDE; | 46 CreateChannelAuthenticator() const OVERRIDE; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 NegotiatingAuthenticator(Authenticator::State initial_state); | 49 explicit NegotiatingAuthenticator(Authenticator::State initial_state); |
| 50 | 50 |
| 51 void AddMethod(const AuthenticationMethod& method); | 51 void AddMethod(const AuthenticationMethod& method); |
| 52 void CreateAuthenticator(State initial_state); | 52 void CreateAuthenticator(State initial_state); |
| 53 bool is_host_side() const; | 53 bool is_host_side() const; |
| 54 | 54 |
| 55 // Used only for host authenticators. | 55 // Used only for host authenticators. |
| 56 std::string local_cert_; | 56 std::string local_cert_; |
| 57 scoped_ptr<crypto::RSAPrivateKey> local_private_key_; | 57 scoped_ptr<crypto::RSAPrivateKey> local_private_key_; |
| 58 bool certificate_sent_; | 58 bool certificate_sent_; |
| 59 std::string shared_secret_hash_; | 59 std::string shared_secret_hash_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 70 State state_; | 70 State state_; |
| 71 RejectionReason rejection_reason_; | 71 RejectionReason rejection_reason_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticator); | 73 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticator); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace protocol | 76 } // namespace protocol |
| 77 } // namespace remoting | 77 } // namespace remoting |
| 78 | 78 |
| 79 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_H_ | 79 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_H_ |
| OLD | NEW |