Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 static SECStatus ClientAuthHandler(void* arg, | 181 static SECStatus ClientAuthHandler(void* arg, |
| 182 PRFileDesc* socket, | 182 PRFileDesc* socket, |
| 183 CERTDistNames* ca_names, | 183 CERTDistNames* ca_names, |
| 184 CERTCertificate** result_certificate, | 184 CERTCertificate** result_certificate, |
| 185 SECKEYPrivateKey** result_private_key); | 185 SECKEYPrivateKey** result_private_key); |
| 186 #endif | 186 #endif |
| 187 // NSS calls this when handshake is completed. We pass 'this' as the second | 187 // NSS calls this when handshake is completed. We pass 'this' as the second |
| 188 // argument. | 188 // argument. |
| 189 static void HandshakeCallback(PRFileDesc* socket, void* arg); | 189 static void HandshakeCallback(PRFileDesc* socket, void* arg); |
| 190 | 190 |
| 191 static SECStatus NextProtoCallback(void* arg, | |
| 192 PRFileDesc* fd, | |
| 193 const unsigned char* protos, | |
| 194 unsigned short protos_len, | |
| 195 unsigned char* proto_out, | |
| 196 unsigned char* proto_out_len); | |
| 197 | |
| 191 // The following methods are for debugging bug 65948. Will remove this code | 198 // The following methods are for debugging bug 65948. Will remove this code |
| 192 // after fixing bug 65948. | 199 // after fixing bug 65948. |
| 193 void EnsureThreadIdAssigned() const; | 200 void EnsureThreadIdAssigned() const; |
| 194 bool CalledOnValidThread() const; | 201 bool CalledOnValidThread() const; |
| 195 | 202 |
| 196 OldCompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_; | 203 OldCompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_; |
| 197 OldCompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_; | 204 OldCompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_; |
| 198 bool transport_send_busy_; | 205 bool transport_send_busy_; |
| 199 bool transport_recv_busy_; | 206 bool transport_recv_busy_; |
| 200 // corked_ is true if we are currently suspending writes to the network. This | 207 // corked_ is true if we are currently suspending writes to the network. This |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 278 // Buffers for the network end of the SSL state machine | 285 // Buffers for the network end of the SSL state machine |
| 279 memio_Private* nss_bufs_; | 286 memio_Private* nss_bufs_; |
| 280 | 287 |
| 281 BoundNetLog net_log_; | 288 BoundNetLog net_log_; |
| 282 | 289 |
| 283 base::TimeTicks start_cert_verification_time_; | 290 base::TimeTicks start_cert_verification_time_; |
| 284 | 291 |
| 285 scoped_ptr<SSLHostInfo> ssl_host_info_; | 292 scoped_ptr<SSLHostInfo> ssl_host_info_; |
| 286 DnsCertProvenanceChecker* const dns_cert_checker_; | 293 DnsCertProvenanceChecker* const dns_cert_checker_; |
| 287 | 294 |
| 295 // next_proto is the protocol that we selected by NPN. | |
|
wtc
2011/10/05 23:34:25
Typo: next_proto => next_proto_
agl
2011/10/07 19:19:17
Done.
| |
| 296 std::string next_proto_; | |
| 297 NextProtoStatus next_proto_status_; | |
| 298 | |
| 288 // The following two variables are added for debugging bug 65948. Will | 299 // The following two variables are added for debugging bug 65948. Will |
| 289 // remove this code after fixing bug 65948. | 300 // remove this code after fixing bug 65948. |
| 290 // Added the following code Debugging in release mode. | 301 // Added the following code Debugging in release mode. |
| 291 mutable base::Lock lock_; | 302 mutable base::Lock lock_; |
| 292 // This is mutable so that CalledOnValidThread can set it. | 303 // This is mutable so that CalledOnValidThread can set it. |
| 293 // It's guarded by |lock_|. | 304 // It's guarded by |lock_|. |
| 294 mutable base::PlatformThreadId valid_thread_id_; | 305 mutable base::PlatformThreadId valid_thread_id_; |
| 295 }; | 306 }; |
| 296 | 307 |
| 297 } // namespace net | 308 } // namespace net |
| 298 | 309 |
| 299 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 310 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |