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

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

Issue 135373002: Added SSLHostInfo. Storing of server host info to our standard disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with TOT Created 6 years, 11 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "net/base/completion_callback.h" 11 #include "net/base/completion_callback.h"
12 #include "net/base/load_flags.h" 12 #include "net/base/load_flags.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "net/socket/ssl_socket.h" 14 #include "net/socket/ssl_socket.h"
15 #include "net/socket/stream_socket.h" 15 #include "net/socket/stream_socket.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 class CertVerifier; 19 class CertVerifier;
20 class CTVerifier; 20 class CTVerifier;
21 class ServerBoundCertService; 21 class ServerBoundCertService;
22 class SSLCertRequestInfo; 22 class SSLCertRequestInfo;
23 struct SSLConfig; 23 struct SSLConfig;
24 class SSLHostInfo;
25 class SSLHostInfoFactory;
24 class SSLInfo; 26 class SSLInfo;
25 class TransportSecurityState; 27 class TransportSecurityState;
26 28
27 // This struct groups together several fields which are used by various 29 // This struct groups together several fields which are used by various
28 // classes related to SSLClientSocket. 30 // classes related to SSLClientSocket.
29 struct SSLClientSocketContext { 31 struct SSLClientSocketContext {
30 SSLClientSocketContext() 32 SSLClientSocketContext()
31 : cert_verifier(NULL), 33 : cert_verifier(NULL),
32 server_bound_cert_service(NULL), 34 server_bound_cert_service(NULL),
33 transport_security_state(NULL), 35 transport_security_state(NULL),
34 cert_transparency_verifier(NULL) {} 36 cert_transparency_verifier(NULL),
37 ssl_host_info_factory(NULL) {}
35 38
36 SSLClientSocketContext(CertVerifier* cert_verifier_arg, 39 SSLClientSocketContext(CertVerifier* cert_verifier_arg,
37 ServerBoundCertService* server_bound_cert_service_arg, 40 ServerBoundCertService* server_bound_cert_service_arg,
38 TransportSecurityState* transport_security_state_arg, 41 TransportSecurityState* transport_security_state_arg,
39 CTVerifier* cert_transparency_verifier_arg, 42 CTVerifier* cert_transparency_verifier_arg,
43 SSLHostInfoFactory* ssl_host_info_factory_arg,
40 const std::string& ssl_session_cache_shard_arg) 44 const std::string& ssl_session_cache_shard_arg)
41 : cert_verifier(cert_verifier_arg), 45 : cert_verifier(cert_verifier_arg),
42 server_bound_cert_service(server_bound_cert_service_arg), 46 server_bound_cert_service(server_bound_cert_service_arg),
43 transport_security_state(transport_security_state_arg), 47 transport_security_state(transport_security_state_arg),
44 cert_transparency_verifier(cert_transparency_verifier_arg), 48 cert_transparency_verifier(cert_transparency_verifier_arg),
49 ssl_host_info_factory(ssl_host_info_factory_arg),
45 ssl_session_cache_shard(ssl_session_cache_shard_arg) {} 50 ssl_session_cache_shard(ssl_session_cache_shard_arg) {}
46 51
47 CertVerifier* cert_verifier; 52 CertVerifier* cert_verifier;
48 ServerBoundCertService* server_bound_cert_service; 53 ServerBoundCertService* server_bound_cert_service;
49 TransportSecurityState* transport_security_state; 54 TransportSecurityState* transport_security_state;
50 CTVerifier* cert_transparency_verifier; 55 CTVerifier* cert_transparency_verifier;
56 SSLHostInfoFactory* ssl_host_info_factory;
51 // ssl_session_cache_shard is an opaque string that identifies a shard of the 57 // ssl_session_cache_shard is an opaque string that identifies a shard of the
52 // SSL session cache. SSL sockets with the same ssl_session_cache_shard may 58 // SSL session cache. SSL sockets with the same ssl_session_cache_shard may
53 // resume each other's SSL sessions but we'll never sessions between shards. 59 // resume each other's SSL sessions but we'll never sessions between shards.
54 const std::string ssl_session_cache_shard; 60 const std::string ssl_session_cache_shard;
55 }; 61 };
56 62
57 // A client socket that uses SSL as the transport layer. 63 // A client socket that uses SSL as the transport layer.
58 // 64 //
59 // NOTE: The SSL handshake occurs within the Connect method after a TCP 65 // NOTE: The SSL handshake occurs within the Connect method after a TCP
60 // connection is established. If a SSL error occurs during the handshake, 66 // connection is established. If a SSL error occurs during the handshake,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bool channel_id_sent_; 179 bool channel_id_sent_;
174 // True if SCTs were received via a TLS extension. 180 // True if SCTs were received via a TLS extension.
175 bool signed_cert_timestamps_received_; 181 bool signed_cert_timestamps_received_;
176 // True if a stapled OCSP response was received. 182 // True if a stapled OCSP response was received.
177 bool stapled_ocsp_response_received_; 183 bool stapled_ocsp_response_received_;
178 }; 184 };
179 185
180 } // namespace net 186 } // namespace net
181 187
182 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ 188 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698