OLD | NEW |
---|---|
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" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 // Returns true if a channel ID was sent on this connection. | 126 // Returns true if a channel ID was sent on this connection. |
127 // This may be useful for protocols, like SPDY, which allow the same | 127 // This may be useful for protocols, like SPDY, which allow the same |
128 // connection to be shared between multiple domains, each of which need | 128 // connection to be shared between multiple domains, each of which need |
129 // a channel ID. | 129 // a channel ID. |
130 // | 130 // |
131 // Public for ssl_client_socket_openssl_unittest.cc. | 131 // Public for ssl_client_socket_openssl_unittest.cc. |
132 virtual bool WasChannelIDSent() const; | 132 virtual bool WasChannelIDSent() const; |
133 | 133 |
134 // Returns true if the server sent Certificate Transparency SCTs | 134 // Returns true if the server sent Certificate Transparency SCTs |
135 // via a TLS extension. | 135 // via a TLS extension. |
136 // Temporary glue for testing while the CT code hasn't landed. | |
137 // TODO(ekasper): expose received SCTs via SSLInfo instead. | |
138 virtual bool WereSignedCertTimestampsReceived() const; | 136 virtual bool WereSignedCertTimestampsReceived() const; |
139 | 137 |
138 // Returns true if the server sent a stapled OCSP response. | |
139 virtual bool WasStapledOCSPResponseReceived() const; | |
Ryan Sleevi
2013/12/10 21:06:09
I'm not sure why we're exposing either of these (t
ekasper
2013/12/11 15:40:51
They were for testing indeed - I've removed them a
| |
140 | |
140 protected: | 141 protected: |
141 virtual void set_channel_id_sent(bool channel_id_sent); | 142 virtual void set_channel_id_sent(bool channel_id_sent); |
142 | 143 |
143 virtual void set_signed_cert_timestamps_received( | 144 virtual void set_signed_cert_timestamps_received( |
144 bool signed_cert_timestamps_received); | 145 bool signed_cert_timestamps_received); |
145 | 146 |
147 virtual void set_stapled_ocsp_response_received( | |
148 bool stapled_ocsp_response_received); | |
149 | |
146 // Records histograms for channel id support during full handshakes - resumed | 150 // Records histograms for channel id support during full handshakes - resumed |
147 // handshakes are ignored. | 151 // handshakes are ignored. |
148 static void RecordChannelIDSupport( | 152 static void RecordChannelIDSupport( |
149 ServerBoundCertService* server_bound_cert_service, | 153 ServerBoundCertService* server_bound_cert_service, |
150 bool negotiated_channel_id, | 154 bool negotiated_channel_id, |
151 bool channel_id_enabled, | 155 bool channel_id_enabled, |
152 bool supports_ecc); | 156 bool supports_ecc); |
153 | 157 |
154 // Returns whether TLS channel ID is enabled. | 158 // Returns whether TLS channel ID is enabled. |
155 static bool IsChannelIDEnabled( | 159 static bool IsChannelIDEnabled( |
156 const SSLConfig& ssl_config, | 160 const SSLConfig& ssl_config, |
157 ServerBoundCertService* server_bound_cert_service); | 161 ServerBoundCertService* server_bound_cert_service); |
158 | 162 |
159 private: | 163 private: |
160 // True if NPN was responded to, independent of selecting SPDY or HTTP. | 164 // True if NPN was responded to, independent of selecting SPDY or HTTP. |
161 bool was_npn_negotiated_; | 165 bool was_npn_negotiated_; |
162 // True if NPN successfully negotiated SPDY. | 166 // True if NPN successfully negotiated SPDY. |
163 bool was_spdy_negotiated_; | 167 bool was_spdy_negotiated_; |
164 // Protocol that we negotiated with the server. | 168 // Protocol that we negotiated with the server. |
165 NextProto protocol_negotiated_; | 169 NextProto protocol_negotiated_; |
166 // True if a channel ID was sent. | 170 // True if a channel ID was sent. |
167 bool channel_id_sent_; | 171 bool channel_id_sent_; |
168 // True if SCTs were received via a TLS extension. | 172 // True if SCTs were received via a TLS extension. |
169 bool signed_cert_timestamps_received_; | 173 bool signed_cert_timestamps_received_; |
174 // True if a stapled OCSP response was received. | |
175 bool stapled_ocsp_response_received_; | |
170 }; | 176 }; |
171 | 177 |
172 } // namespace net | 178 } // namespace net |
173 | 179 |
174 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 180 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |