Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Side by Side Diff: net/socket/ssl_client_socket_nss.h

Issue 4339001: Correctly handle SSL Client Authentication requests when connecting... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebase... Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_NSS_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <certt.h> 9 #include <certt.h>
10 #include <keyt.h> 10 #include <keyt.h>
(...skipping 25 matching lines...) Expand all
36 36
37 // An SSL client socket implemented with Mozilla NSS. 37 // An SSL client socket implemented with Mozilla NSS.
38 class SSLClientSocketNSS : public SSLClientSocket { 38 class SSLClientSocketNSS : public SSLClientSocket {
39 public: 39 public:
40 // Takes ownership of the |transport_socket|, which must already be connected. 40 // Takes ownership of the |transport_socket|, which must already be connected.
41 // The given hostname will be compared with the name(s) in the server's 41 // The given hostname will be compared with the name(s) in the server's
42 // certificate during the SSL handshake. ssl_config specifies the SSL 42 // certificate during the SSL handshake. ssl_config specifies the SSL
43 // settings. 43 // settings.
44 SSLClientSocketNSS(ClientSocketHandle* transport_socket, 44 SSLClientSocketNSS(ClientSocketHandle* transport_socket,
45 const std::string& hostname, 45 const std::string& hostname,
46 uint16 port,
46 const SSLConfig& ssl_config, 47 const SSLConfig& ssl_config,
47 SSLHostInfo* ssl_host_info, 48 SSLHostInfo* ssl_host_info,
48 DnsRRResolver* dnsrr_resolver); 49 DnsRRResolver* dnsrr_resolver);
49 ~SSLClientSocketNSS(); 50 ~SSLClientSocketNSS();
50 51
51 // SSLClientSocket methods: 52 // SSLClientSocket methods:
52 virtual void GetSSLInfo(SSLInfo* ssl_info); 53 virtual void GetSSLInfo(SSLInfo* ssl_info);
53 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); 54 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info);
54 virtual NextProtoStatus GetNextProto(std::string* proto); 55 virtual NextProtoStatus GetNextProto(std::string* proto);
55 virtual void UseDNSSEC(DNSSECProvider* provider); 56 virtual void UseDNSSEC(DNSSECProvider* provider);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // is named after the similar kernel flag, TCP_CORK. 153 // is named after the similar kernel flag, TCP_CORK.
153 bool corked_; 154 bool corked_;
154 // uncork_timer_ is used to limit the amount of time that we'll delay the 155 // uncork_timer_ is used to limit the amount of time that we'll delay the
155 // Finished message while waiting for a Write. 156 // Finished message while waiting for a Write.
156 base::OneShotTimer<SSLClientSocketNSS> uncork_timer_; 157 base::OneShotTimer<SSLClientSocketNSS> uncork_timer_;
157 scoped_refptr<IOBuffer> recv_buffer_; 158 scoped_refptr<IOBuffer> recv_buffer_;
158 159
159 CompletionCallbackImpl<SSLClientSocketNSS> handshake_io_callback_; 160 CompletionCallbackImpl<SSLClientSocketNSS> handshake_io_callback_;
160 scoped_ptr<ClientSocketHandle> transport_; 161 scoped_ptr<ClientSocketHandle> transport_;
161 std::string hostname_; 162 std::string hostname_;
163 uint16 port_;
162 SSLConfig ssl_config_; 164 SSLConfig ssl_config_;
163 165
164 CompletionCallback* user_connect_callback_; 166 CompletionCallback* user_connect_callback_;
165 CompletionCallback* user_read_callback_; 167 CompletionCallback* user_read_callback_;
166 CompletionCallback* user_write_callback_; 168 CompletionCallback* user_write_callback_;
167 169
168 // Used by Read function. 170 // Used by Read function.
169 scoped_refptr<IOBuffer> user_read_buf_; 171 scoped_refptr<IOBuffer> user_read_buf_;
170 int user_read_buf_len_; 172 int user_read_buf_len_;
171 173
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 std::string predicted_npn_proto_; 248 std::string predicted_npn_proto_;
247 bool predicted_npn_proto_used_; 249 bool predicted_npn_proto_used_;
248 250
249 scoped_ptr<SSLHostInfo> ssl_host_info_; 251 scoped_ptr<SSLHostInfo> ssl_host_info_;
250 DnsRRResolver* const dnsrr_resolver_; 252 DnsRRResolver* const dnsrr_resolver_;
251 }; 253 };
252 254
253 } // namespace net 255 } // namespace net
254 256
255 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 257 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698