OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_BASE_SSL_CLIENT_SOCKET_WIN_H_ | 5 #ifndef NET_BASE_SSL_CLIENT_SOCKET_WIN_H_ |
6 #define NET_BASE_SSL_CLIENT_SOCKET_WIN_H_ | 6 #define NET_BASE_SSL_CLIENT_SOCKET_WIN_H_ |
7 | 7 |
8 #define SECURITY_WIN32 // Needs to be defined before including security.h | 8 #define SECURITY_WIN32 // Needs to be defined before including security.h |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
11 #include <wincrypt.h> | 11 #include <wincrypt.h> |
(...skipping 17 matching lines...) Expand all Loading... |
29 // The given hostname will be compared with the name(s) in the server's | 29 // The given hostname will be compared with the name(s) in the server's |
30 // certificate during the SSL handshake. ssl_config specifies the SSL | 30 // certificate during the SSL handshake. ssl_config specifies the SSL |
31 // settings. | 31 // settings. |
32 SSLClientSocketWin(ClientSocket* transport_socket, | 32 SSLClientSocketWin(ClientSocket* transport_socket, |
33 const std::string& hostname, | 33 const std::string& hostname, |
34 const SSLConfig& ssl_config); | 34 const SSLConfig& ssl_config); |
35 ~SSLClientSocketWin(); | 35 ~SSLClientSocketWin(); |
36 | 36 |
37 // SSLClientSocket methods: | 37 // SSLClientSocket methods: |
38 virtual void GetSSLInfo(SSLInfo* ssl_info); | 38 virtual void GetSSLInfo(SSLInfo* ssl_info); |
| 39 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); |
39 | 40 |
40 // ClientSocket methods: | 41 // ClientSocket methods: |
41 virtual int Connect(CompletionCallback* callback); | 42 virtual int Connect(CompletionCallback* callback); |
42 virtual void Disconnect(); | 43 virtual void Disconnect(); |
43 virtual bool IsConnected() const; | 44 virtual bool IsConnected() const; |
44 virtual bool IsConnectedAndIdle() const; | 45 virtual bool IsConnectedAndIdle() const; |
45 | 46 |
46 // Socket methods: | 47 // Socket methods: |
47 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 48 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
48 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 49 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // STATE_PAYLOAD_READ_COMPLETE states. True if a 'result' argument of OK | 141 // STATE_PAYLOAD_READ_COMPLETE states. True if a 'result' argument of OK |
141 // should be ignored, to prevent it from being interpreted as EOF. | 142 // should be ignored, to prevent it from being interpreted as EOF. |
142 // | 143 // |
143 // The reason we need this flag is that OK means not only "0 bytes of data | 144 // The reason we need this flag is that OK means not only "0 bytes of data |
144 // were read" but also EOF. We set ignore_ok_result_ to true when we need | 145 // were read" but also EOF. We set ignore_ok_result_ to true when we need |
145 // to continue processing previously read data without reading more data. | 146 // to continue processing previously read data without reading more data. |
146 // We have to pass a 'result' of OK to the DoLoop method, and don't want it | 147 // We have to pass a 'result' of OK to the DoLoop method, and don't want it |
147 // to be interpreted as EOF. | 148 // to be interpreted as EOF. |
148 bool ignore_ok_result_; | 149 bool ignore_ok_result_; |
149 | 150 |
150 // True if the user has no client certificate. | |
151 bool no_client_cert_; | |
152 | |
153 // Renegotiation is in progress. | 151 // Renegotiation is in progress. |
154 bool renegotiating_; | 152 bool renegotiating_; |
155 }; | 153 }; |
156 | 154 |
157 } // namespace net | 155 } // namespace net |
158 | 156 |
159 #endif // NET_BASE_SSL_CLIENT_SOCKET_WIN_H_ | 157 #endif // NET_BASE_SSL_CLIENT_SOCKET_WIN_H_ |
OLD | NEW |