| 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 "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Get the maximum SSL version supported by the underlying library and | 124 // Get the maximum SSL version supported by the underlying library and |
| 125 // cryptographic implementation. | 125 // cryptographic implementation. |
| 126 static uint16 GetMaxSupportedSSLVersion(); | 126 static uint16 GetMaxSupportedSSLVersion(); |
| 127 | 127 |
| 128 void set_negotiation_extension(SSLNegotiationExtension negotiation_extension); | 128 void set_negotiation_extension(SSLNegotiationExtension negotiation_extension); |
| 129 | 129 |
| 130 // Returns the ChannelIDService used by this socket, or NULL if | 130 // Returns the ChannelIDService used by this socket, or NULL if |
| 131 // channel ids are not supported. | 131 // channel ids are not supported. |
| 132 virtual ChannelIDService* GetChannelIDService() const = 0; | 132 virtual ChannelIDService* GetChannelIDService() const = 0; |
| 133 | 133 |
| 134 // Returns true if a channel ID was sent on this connection. | |
| 135 // This may be useful for protocols, like SPDY, which allow the same | |
| 136 // connection to be shared between multiple domains, each of which need | |
| 137 // a channel ID. | |
| 138 // | |
| 139 // Public for ssl_client_socket_openssl_unittest.cc. | |
| 140 virtual bool WasChannelIDSent() const; | |
| 141 | |
| 142 protected: | 134 protected: |
| 143 virtual void set_channel_id_sent(bool channel_id_sent); | |
| 144 | |
| 145 virtual void set_signed_cert_timestamps_received( | 135 virtual void set_signed_cert_timestamps_received( |
| 146 bool signed_cert_timestamps_received); | 136 bool signed_cert_timestamps_received); |
| 147 | 137 |
| 148 virtual void set_stapled_ocsp_response_received( | 138 virtual void set_stapled_ocsp_response_received( |
| 149 bool stapled_ocsp_response_received); | 139 bool stapled_ocsp_response_received); |
| 150 | 140 |
| 151 // Record which TLS extension was used to negotiate protocol and protocol | 141 // Record which TLS extension was used to negotiate protocol and protocol |
| 152 // chosen in a UMA histogram. | 142 // chosen in a UMA histogram. |
| 153 void RecordNegotiationExtension(); | 143 void RecordNegotiationExtension(); |
| 154 | 144 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 ConnectSignedCertTimestampsEnabledTLSExtension); | 187 ConnectSignedCertTimestampsEnabledTLSExtension); |
| 198 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, | 188 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, |
| 199 ConnectSignedCertTimestampsEnabledOCSP); | 189 ConnectSignedCertTimestampsEnabledOCSP); |
| 200 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, | 190 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, |
| 201 ConnectSignedCertTimestampsDisabled); | 191 ConnectSignedCertTimestampsDisabled); |
| 202 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, | 192 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, |
| 203 VerifyServerChainProperlyOrdered); | 193 VerifyServerChainProperlyOrdered); |
| 204 | 194 |
| 205 // Protocol that we negotiated with the server. | 195 // Protocol that we negotiated with the server. |
| 206 NextProto protocol_negotiated_; | 196 NextProto protocol_negotiated_; |
| 207 // True if a channel ID was sent. | |
| 208 bool channel_id_sent_; | |
| 209 // True if SCTs were received via a TLS extension. | 197 // True if SCTs were received via a TLS extension. |
| 210 bool signed_cert_timestamps_received_; | 198 bool signed_cert_timestamps_received_; |
| 211 // True if a stapled OCSP response was received. | 199 // True if a stapled OCSP response was received. |
| 212 bool stapled_ocsp_response_received_; | 200 bool stapled_ocsp_response_received_; |
| 213 // Protocol negotiation extension used. | 201 // Protocol negotiation extension used. |
| 214 SSLNegotiationExtension negotiation_extension_; | 202 SSLNegotiationExtension negotiation_extension_; |
| 215 }; | 203 }; |
| 216 | 204 |
| 217 } // namespace net | 205 } // namespace net |
| 218 | 206 |
| 219 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 207 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
| OLD | NEW |