| OLD | NEW |
| 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 #ifndef REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ |
| 6 #define REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ | 6 #define REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 NegotiatingHostAuthenticator(const std::string& local_id, | 66 NegotiatingHostAuthenticator(const std::string& local_id, |
| 67 const std::string& remote_id, | 67 const std::string& remote_id, |
| 68 const std::string& local_cert, | 68 const std::string& local_cert, |
| 69 scoped_refptr<RsaKeyPair> key_pair); | 69 scoped_refptr<RsaKeyPair> key_pair); |
| 70 | 70 |
| 71 // (Asynchronously) creates an authenticator, and stores it in | 71 // (Asynchronously) creates an authenticator, and stores it in |
| 72 // |current_authenticator_|. Authenticators that can be started in either | 72 // |current_authenticator_|. Authenticators that can be started in either |
| 73 // state will be created in |preferred_initial_state|. | 73 // state will be created in |preferred_initial_state|. |
| 74 // |resume_callback| is called after |current_authenticator_| is set. | |
| 75 void CreateAuthenticator(Authenticator::State preferred_initial_state, | 74 void CreateAuthenticator(Authenticator::State preferred_initial_state, |
| 76 const base::Closure& resume_callback); | 75 const base::Closure& resume_callback); |
| 77 | 76 |
| 78 std::string local_id_; | 77 std::string local_id_; |
| 79 std::string remote_id_; | 78 std::string remote_id_; |
| 80 | 79 |
| 81 std::string local_cert_; | 80 std::string local_cert_; |
| 82 scoped_refptr<RsaKeyPair> local_key_pair_; | 81 scoped_refptr<RsaKeyPair> local_key_pair_; |
| 83 | 82 |
| 84 // Used only for shared secret host authenticators. | 83 // Used only for shared secret host authenticators. |
| 85 std::string shared_secret_hash_; | 84 std::string shared_secret_hash_; |
| 86 | 85 |
| 87 // Used only for third party host authenticators. | 86 // Used only for third party host authenticators. |
| 88 scoped_refptr<TokenValidatorFactory> token_validator_factory_; | 87 scoped_refptr<TokenValidatorFactory> token_validator_factory_; |
| 89 | 88 |
| 90 // Used only for pairing authenticators. | 89 // Used only for pairing authenticators. |
| 91 scoped_refptr<PairingRegistry> pairing_registry_; | 90 scoped_refptr<PairingRegistry> pairing_registry_; |
| 92 | 91 |
| 92 std::string client_id_; |
| 93 |
| 93 DISALLOW_COPY_AND_ASSIGN(NegotiatingHostAuthenticator); | 94 DISALLOW_COPY_AND_ASSIGN(NegotiatingHostAuthenticator); |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 } // namespace protocol | 97 } // namespace protocol |
| 97 } // namespace remoting | 98 } // namespace remoting |
| 98 | 99 |
| 99 #endif // REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ | 100 #endif // REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ |
| OLD | NEW |