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

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

Issue 76443006: Certificate Transparency: Threading the CT verifier into the SSL client socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reverted changes to cert_status_flags, added error code Created 7 years 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 "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
11 #include "net/base/load_flags.h" 11 #include "net/base/load_flags.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "net/socket/ssl_socket.h" 13 #include "net/socket/ssl_socket.h"
14 #include "net/socket/stream_socket.h" 14 #include "net/socket/stream_socket.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 class CertVerifier; 18 class CertVerifier;
19 class CTVerifier;
19 class ServerBoundCertService; 20 class ServerBoundCertService;
20 class SSLCertRequestInfo; 21 class SSLCertRequestInfo;
21 struct SSLConfig; 22 struct SSLConfig;
22 class SSLInfo; 23 class SSLInfo;
23 class TransportSecurityState; 24 class TransportSecurityState;
24 25
25 // This struct groups together several fields which are used by various 26 // This struct groups together several fields which are used by various
26 // classes related to SSLClientSocket. 27 // classes related to SSLClientSocket.
27 struct SSLClientSocketContext { 28 struct SSLClientSocketContext {
28 SSLClientSocketContext() 29 SSLClientSocketContext()
29 : cert_verifier(NULL), 30 : cert_verifier(NULL),
30 server_bound_cert_service(NULL), 31 server_bound_cert_service(NULL),
31 transport_security_state(NULL) {} 32 transport_security_state(NULL),
33 cert_transparency_verifier(NULL) {}
32 34
33 SSLClientSocketContext(CertVerifier* cert_verifier_arg, 35 SSLClientSocketContext(CertVerifier* cert_verifier_arg,
34 ServerBoundCertService* server_bound_cert_service_arg, 36 ServerBoundCertService* server_bound_cert_service_arg,
35 TransportSecurityState* transport_security_state_arg, 37 TransportSecurityState* transport_security_state_arg,
38 CTVerifier* cert_transparency_verifier_arg,
36 const std::string& ssl_session_cache_shard_arg) 39 const std::string& ssl_session_cache_shard_arg)
37 : cert_verifier(cert_verifier_arg), 40 : cert_verifier(cert_verifier_arg),
38 server_bound_cert_service(server_bound_cert_service_arg), 41 server_bound_cert_service(server_bound_cert_service_arg),
39 transport_security_state(transport_security_state_arg), 42 transport_security_state(transport_security_state_arg),
43 cert_transparency_verifier(cert_transparency_verifier_arg),
40 ssl_session_cache_shard(ssl_session_cache_shard_arg) {} 44 ssl_session_cache_shard(ssl_session_cache_shard_arg) {}
41 45
42 CertVerifier* cert_verifier; 46 CertVerifier* cert_verifier;
43 ServerBoundCertService* server_bound_cert_service; 47 ServerBoundCertService* server_bound_cert_service;
44 TransportSecurityState* transport_security_state; 48 TransportSecurityState* transport_security_state;
49 CTVerifier* cert_transparency_verifier;
45 // ssl_session_cache_shard is an opaque string that identifies a shard of the 50 // ssl_session_cache_shard is an opaque string that identifies a shard of the
46 // SSL session cache. SSL sockets with the same ssl_session_cache_shard may 51 // SSL session cache. SSL sockets with the same ssl_session_cache_shard may
47 // resume each other's SSL sessions but we'll never sessions between shards. 52 // resume each other's SSL sessions but we'll never sessions between shards.
48 const std::string ssl_session_cache_shard; 53 const std::string ssl_session_cache_shard;
49 }; 54 };
50 55
51 // A client socket that uses SSL as the transport layer. 56 // A client socket that uses SSL as the transport layer.
52 // 57 //
53 // NOTE: The SSL handshake occurs within the Connect method after a TCP 58 // NOTE: The SSL handshake occurs within the Connect method after a TCP
54 // connection is established. If a SSL error occurs during the handshake, 59 // connection is established. If a SSL error occurs during the handshake,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 bool was_spdy_negotiated_; 154 bool was_spdy_negotiated_;
150 // Protocol that we negotiated with the server. 155 // Protocol that we negotiated with the server.
151 NextProto protocol_negotiated_; 156 NextProto protocol_negotiated_;
152 // True if a channel ID was sent. 157 // True if a channel ID was sent.
153 bool channel_id_sent_; 158 bool channel_id_sent_;
154 }; 159 };
155 160
156 } // namespace net 161 } // namespace net
157 162
158 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ 163 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698