OLD | NEW |
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 int BufferSend(void); | 116 int BufferSend(void); |
117 int BufferRecv(void); | 117 int BufferRecv(void); |
118 void BufferSendComplete(int result); | 118 void BufferSendComplete(int result); |
119 void BufferRecvComplete(int result); | 119 void BufferRecvComplete(int result); |
120 | 120 |
121 // NSS calls this when checking certificates. We pass 'this' as the first | 121 // NSS calls this when checking certificates. We pass 'this' as the first |
122 // argument. | 122 // argument. |
123 static SECStatus OwnAuthCertHandler(void* arg, PRFileDesc* socket, | 123 static SECStatus OwnAuthCertHandler(void* arg, PRFileDesc* socket, |
124 PRBool checksig, PRBool is_server); | 124 PRBool checksig, PRBool is_server); |
125 // NSS calls this when client authentication is requested. | 125 // NSS calls this when client authentication is requested. |
| 126 #if defined(NSS_PLATFORM_CLIENT_AUTH) |
| 127 static SECStatus PlatformClientAuthHandler(void* arg, |
| 128 PRFileDesc* socket, |
| 129 CERTDistNames* ca_names, |
| 130 CERTCertList** result_certs, |
| 131 void** result_private_key); |
| 132 #else |
126 static SECStatus ClientAuthHandler(void* arg, | 133 static SECStatus ClientAuthHandler(void* arg, |
127 PRFileDesc* socket, | 134 PRFileDesc* socket, |
128 CERTDistNames* ca_names, | 135 CERTDistNames* ca_names, |
129 CERTCertificate** result_certificate, | 136 CERTCertificate** result_certificate, |
130 SECKEYPrivateKey** result_private_key); | 137 SECKEYPrivateKey** result_private_key); |
| 138 #endif |
131 // NSS calls this when handshake is completed. We pass 'this' as the second | 139 // NSS calls this when handshake is completed. We pass 'this' as the second |
132 // argument. | 140 // argument. |
133 static void HandshakeCallback(PRFileDesc* socket, void* arg); | 141 static void HandshakeCallback(PRFileDesc* socket, void* arg); |
134 | 142 |
135 CompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_; | 143 CompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_; |
136 CompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_; | 144 CompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_; |
137 bool transport_send_busy_; | 145 bool transport_send_busy_; |
138 bool transport_recv_busy_; | 146 bool transport_recv_busy_; |
139 // corked_ is true if we are currently suspending writes to the network. This | 147 // corked_ is true if we are currently suspending writes to the network. This |
140 // is named after the similar kernel flag, TCP_CORK. | 148 // is named after the similar kernel flag, TCP_CORK. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 SSLClientSocket::NextProtoStatus predicted_npn_status_; | 245 SSLClientSocket::NextProtoStatus predicted_npn_status_; |
238 std::string predicted_npn_proto_; | 246 std::string predicted_npn_proto_; |
239 bool predicted_npn_proto_used_; | 247 bool predicted_npn_proto_used_; |
240 | 248 |
241 scoped_ptr<SSLHostInfo> ssl_host_info_; | 249 scoped_ptr<SSLHostInfo> ssl_host_info_; |
242 }; | 250 }; |
243 | 251 |
244 } // namespace net | 252 } // namespace net |
245 | 253 |
246 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 254 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
OLD | NEW |