| 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 NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 78 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; |
| 79 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 79 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
| 80 virtual const BoundNetLog& NetLog() const OVERRIDE; | 80 virtual const BoundNetLog& NetLog() const OVERRIDE; |
| 81 virtual void SetSubresourceSpeculation() OVERRIDE; | 81 virtual void SetSubresourceSpeculation() OVERRIDE; |
| 82 virtual void SetOmniboxSpeculation() OVERRIDE; | 82 virtual void SetOmniboxSpeculation() OVERRIDE; |
| 83 virtual bool WasEverUsed() const OVERRIDE; | 83 virtual bool WasEverUsed() const OVERRIDE; |
| 84 virtual bool UsingTCPFastOpen() const OVERRIDE; | 84 virtual bool UsingTCPFastOpen() const OVERRIDE; |
| 85 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 85 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; |
| 86 | 86 |
| 87 // Socket implementation. | 87 // Socket implementation. |
| 88 virtual int Read(IOBuffer* buf, int buf_len, | 88 virtual int Read(IOBuffer* buf, |
| 89 int buf_len, |
| 89 const CompletionCallback& callback) OVERRIDE; | 90 const CompletionCallback& callback) OVERRIDE; |
| 90 virtual int Write(IOBuffer* buf, int buf_len, | 91 virtual int Write(IOBuffer* buf, |
| 92 int buf_len, |
| 91 const CompletionCallback& callback) OVERRIDE; | 93 const CompletionCallback& callback) OVERRIDE; |
| 92 virtual int SetReceiveBufferSize(int32 size) OVERRIDE; | 94 virtual int SetReceiveBufferSize(int32 size) OVERRIDE; |
| 93 virtual int SetSendBufferSize(int32 size) OVERRIDE; | 95 virtual int SetSendBufferSize(int32 size) OVERRIDE; |
| 94 | 96 |
| 95 protected: | 97 protected: |
| 96 // SSLClientSocket implementation. | 98 // SSLClientSocket implementation. |
| 97 virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain() | 99 virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain() |
| 98 const OVERRIDE; | 100 const OVERRIDE; |
| 99 | 101 |
| 100 private: | 102 private: |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // a certificate for this client. | 137 // a certificate for this client. |
| 136 int ClientCertRequestCallback(SSL* ssl, X509** x509, EVP_PKEY** pkey); | 138 int ClientCertRequestCallback(SSL* ssl, X509** x509, EVP_PKEY** pkey); |
| 137 | 139 |
| 138 // Callback from the SSL layer that indicates the remote server supports TLS | 140 // Callback from the SSL layer that indicates the remote server supports TLS |
| 139 // Channel IDs. | 141 // Channel IDs. |
| 140 void ChannelIDRequestCallback(SSL* ssl, EVP_PKEY** pkey); | 142 void ChannelIDRequestCallback(SSL* ssl, EVP_PKEY** pkey); |
| 141 | 143 |
| 142 // CertVerifyCallback is called to verify the server's certificates. We do | 144 // CertVerifyCallback is called to verify the server's certificates. We do |
| 143 // verification after the handshake so this function only enforces that the | 145 // verification after the handshake so this function only enforces that the |
| 144 // certificates don't change during renegotiation. | 146 // certificates don't change during renegotiation. |
| 145 int CertVerifyCallback(X509_STORE_CTX *store_ctx); | 147 int CertVerifyCallback(X509_STORE_CTX* store_ctx); |
| 146 | 148 |
| 147 // Callback from the SSL layer to check which NPN protocol we are supporting | 149 // Callback from the SSL layer to check which NPN protocol we are supporting |
| 148 int SelectNextProtoCallback(unsigned char** out, unsigned char* outlen, | 150 int SelectNextProtoCallback(unsigned char** out, |
| 149 const unsigned char* in, unsigned int inlen); | 151 unsigned char* outlen, |
| 152 const unsigned char* in, |
| 153 unsigned int inlen); |
| 150 | 154 |
| 151 bool transport_send_busy_; | 155 bool transport_send_busy_; |
| 152 bool transport_recv_busy_; | 156 bool transport_recv_busy_; |
| 153 bool transport_recv_eof_; | 157 bool transport_recv_eof_; |
| 154 | 158 |
| 155 scoped_refptr<DrainableIOBuffer> send_buffer_; | 159 scoped_refptr<DrainableIOBuffer> send_buffer_; |
| 156 scoped_refptr<IOBuffer> recv_buffer_; | 160 scoped_refptr<IOBuffer> recv_buffer_; |
| 157 | 161 |
| 158 CompletionCallback user_connect_callback_; | 162 CompletionCallback user_connect_callback_; |
| 159 CompletionCallback user_read_callback_; | 163 CompletionCallback user_read_callback_; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // True if channel ID extension was negotiated. | 241 // True if channel ID extension was negotiated. |
| 238 bool channel_id_xtn_negotiated_; | 242 bool channel_id_xtn_negotiated_; |
| 239 // The request handle for |server_bound_cert_service_|. | 243 // The request handle for |server_bound_cert_service_|. |
| 240 ServerBoundCertService::RequestHandle channel_id_request_handle_; | 244 ServerBoundCertService::RequestHandle channel_id_request_handle_; |
| 241 BoundNetLog net_log_; | 245 BoundNetLog net_log_; |
| 242 }; | 246 }; |
| 243 | 247 |
| 244 } // namespace net | 248 } // namespace net |
| 245 | 249 |
| 246 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 250 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| OLD | NEW |