| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // authentication is requested, the host_and_port field of SSLCertRequestInfo | 50 // authentication is requested, the host_and_port field of SSLCertRequestInfo |
| 51 // will be populated with |host_and_port|. |ssl_config| specifies | 51 // will be populated with |host_and_port|. |ssl_config| specifies |
| 52 // the SSL settings. | 52 // the SSL settings. |
| 53 SSLClientSocketNSS(ClientSocketHandle* transport_socket, | 53 SSLClientSocketNSS(ClientSocketHandle* transport_socket, |
| 54 const HostPortPair& host_and_port, | 54 const HostPortPair& host_and_port, |
| 55 const SSLConfig& ssl_config, | 55 const SSLConfig& ssl_config, |
| 56 SSLHostInfo* ssl_host_info, | 56 SSLHostInfo* ssl_host_info, |
| 57 const SSLClientSocketContext& context); | 57 const SSLClientSocketContext& context); |
| 58 virtual ~SSLClientSocketNSS(); | 58 virtual ~SSLClientSocketNSS(); |
| 59 | 59 |
| 60 NET_EXPORT_PRIVATE static void ClearSessionCache(); | |
| 61 | |
| 62 // SSLClientSocket implementation. | 60 // SSLClientSocket implementation. |
| 63 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 61 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; |
| 64 virtual void GetSSLCertRequestInfo( | 62 virtual void GetSSLCertRequestInfo( |
| 65 SSLCertRequestInfo* cert_request_info) OVERRIDE; | 63 SSLCertRequestInfo* cert_request_info) OVERRIDE; |
| 66 virtual int ExportKeyingMaterial(const base::StringPiece& label, | 64 virtual int ExportKeyingMaterial(const base::StringPiece& label, |
| 67 const base::StringPiece& context, | 65 const base::StringPiece& context, |
| 68 unsigned char *out, | 66 unsigned char *out, |
| 69 unsigned int outlen) OVERRIDE; | 67 unsigned int outlen) OVERRIDE; |
| 70 virtual NextProtoStatus GetNextProto(std::string* proto, | 68 virtual NextProtoStatus GetNextProto(std::string* proto, |
| 71 std::string* server_protos) OVERRIDE; | 69 std::string* server_protos) OVERRIDE; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 std::string ob_private_key_; | 269 std::string ob_private_key_; |
| 272 std::string ob_cert_; | 270 std::string ob_cert_; |
| 273 OriginBoundCertService::RequestHandle ob_cert_request_handle_; | 271 OriginBoundCertService::RequestHandle ob_cert_request_handle_; |
| 274 | 272 |
| 275 // True if NSS has called HandshakeCallback. | 273 // True if NSS has called HandshakeCallback. |
| 276 bool handshake_callback_called_; | 274 bool handshake_callback_called_; |
| 277 | 275 |
| 278 // True if the SSL handshake has been completed. | 276 // True if the SSL handshake has been completed. |
| 279 bool completed_handshake_; | 277 bool completed_handshake_; |
| 280 | 278 |
| 279 // session_cache_shard_ is an opaque string that partitions the SSL session |
| 280 // cache. i.e. sessions created with one value will not attempt to resume on |
| 281 // the socket with a different value. |
| 282 const std::string session_cache_shard_; |
| 283 |
| 281 // True iff we believe that the user has an ESET product intercepting our | 284 // True iff we believe that the user has an ESET product intercepting our |
| 282 // HTTPS connections. | 285 // HTTPS connections. |
| 283 bool eset_mitm_detected_; | 286 bool eset_mitm_detected_; |
| 284 // True iff we believe that the user has a Kaspersky product intercepting our | 287 // True iff we believe that the user has a Kaspersky product intercepting our |
| 285 // HTTPS connections. | 288 // HTTPS connections. |
| 286 bool kaspersky_mitm_detected_; | 289 bool kaspersky_mitm_detected_; |
| 287 | 290 |
| 288 // True iff |ssl_host_info_| contained a predicted certificate chain and | 291 // True iff |ssl_host_info_| contained a predicted certificate chain and |
| 289 // that we found the prediction to be correct. | 292 // that we found the prediction to be correct. |
| 290 bool predicted_cert_chain_correct_; | 293 bool predicted_cert_chain_correct_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 318 // Added the following code Debugging in release mode. | 321 // Added the following code Debugging in release mode. |
| 319 mutable base::Lock lock_; | 322 mutable base::Lock lock_; |
| 320 // This is mutable so that CalledOnValidThread can set it. | 323 // This is mutable so that CalledOnValidThread can set it. |
| 321 // It's guarded by |lock_|. | 324 // It's guarded by |lock_|. |
| 322 mutable base::PlatformThreadId valid_thread_id_; | 325 mutable base::PlatformThreadId valid_thread_id_; |
| 323 }; | 326 }; |
| 324 | 327 |
| 325 } // namespace net | 328 } // namespace net |
| 326 | 329 |
| 327 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 330 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |