| 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_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ |
| 6 #define REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ | 6 #define REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void OnAuthBytesWritten(int result); | 70 void OnAuthBytesWritten(int result); |
| 71 bool HandleAuthBytesWritten(int result, bool* callback_called); | 71 bool HandleAuthBytesWritten(int result, bool* callback_called); |
| 72 | 72 |
| 73 void ReadAuthenticationBytes(); | 73 void ReadAuthenticationBytes(); |
| 74 void OnAuthBytesRead(int result); | 74 void OnAuthBytesRead(int result); |
| 75 bool HandleAuthBytesRead(int result); | 75 bool HandleAuthBytesRead(int result); |
| 76 bool VerifyAuthBytes(const std::string& received_auth_bytes); | 76 bool VerifyAuthBytes(const std::string& received_auth_bytes); |
| 77 | 77 |
| 78 void CheckDone(bool* callback_called); | 78 void CheckDone(bool* callback_called); |
| 79 void NotifyError(int error); | 79 void NotifyError(int error); |
| 80 void CallDoneCallback(int error, scoped_ptr<net::StreamSocket> socket); | |
| 81 | 80 |
| 82 // The mutual secret used for authentication. | 81 // The mutual secret used for authentication. |
| 83 std::string auth_key_; | 82 std::string auth_key_; |
| 84 | 83 |
| 85 // Used in the SERVER mode only. | 84 // Used in the SERVER mode only. |
| 86 std::string local_cert_; | 85 std::string local_cert_; |
| 87 scoped_refptr<RsaKeyPair> local_key_pair_; | 86 scoped_refptr<RsaKeyPair> local_key_pair_; |
| 88 | 87 |
| 89 // Used in the CLIENT mode only. | 88 // Used in the CLIENT mode only. |
| 90 std::string remote_cert_; | 89 std::string remote_cert_; |
| 91 scoped_ptr<net::TransportSecurityState> transport_security_state_; | 90 scoped_ptr<net::TransportSecurityState> transport_security_state_; |
| 92 | 91 |
| 93 scoped_ptr<net::SSLSocket> socket_; | 92 scoped_ptr<net::SSLSocket> socket_; |
| 94 DoneCallback done_callback_; | 93 DoneCallback done_callback_; |
| 95 | 94 |
| 96 scoped_refptr<net::DrainableIOBuffer> auth_write_buf_; | 95 scoped_refptr<net::DrainableIOBuffer> auth_write_buf_; |
| 97 scoped_refptr<net::GrowableIOBuffer> auth_read_buf_; | 96 scoped_refptr<net::GrowableIOBuffer> auth_read_buf_; |
| 98 | 97 |
| 99 DISALLOW_COPY_AND_ASSIGN(SslHmacChannelAuthenticator); | 98 DISALLOW_COPY_AND_ASSIGN(SslHmacChannelAuthenticator); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 } // namespace protocol | 101 } // namespace protocol |
| 103 } // namespace remoting | 102 } // namespace remoting |
| 104 | 103 |
| 105 #endif // REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ | 104 #endif // REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ |
| OLD | NEW |