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

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

Issue 801803002: Add SSLClientSocket::SerializeNextProtos unittest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 const NextProtoVector& next_protos); 215 const NextProtoVector& next_protos);
216 216
217 // For unit testing only. 217 // For unit testing only.
218 // Returns the unverified certificate chain as presented by server. 218 // Returns the unverified certificate chain as presented by server.
219 // Note that chain may be different than the verified chain returned by 219 // Note that chain may be different than the verified chain returned by
220 // StreamSocket::GetSSLInfo(). 220 // StreamSocket::GetSSLInfo().
221 virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain() 221 virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
222 const = 0; 222 const = 0;
223 223
224 private: 224 private:
225 FRIEND_TEST_ALL_PREFIXES(SSLClientSocket, SerializeNextProtos);
225 // For signed_cert_timestamps_received_ and stapled_ocsp_response_received_. 226 // For signed_cert_timestamps_received_ and stapled_ocsp_response_received_.
226 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 227 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
227 ConnectSignedCertTimestampsEnabledTLSExtension); 228 ConnectSignedCertTimestampsEnabledTLSExtension);
228 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 229 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
229 ConnectSignedCertTimestampsEnabledOCSP); 230 ConnectSignedCertTimestampsEnabledOCSP);
230 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 231 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
231 ConnectSignedCertTimestampsDisabled); 232 ConnectSignedCertTimestampsDisabled);
232 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 233 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
233 VerifyServerChainProperlyOrdered); 234 VerifyServerChainProperlyOrdered);
234 235
235 // True if NPN was responded to, independent of selecting SPDY or HTTP. 236 // True if NPN was responded to, independent of selecting SPDY or HTTP.
236 bool was_npn_negotiated_; 237 bool was_npn_negotiated_;
237 // True if NPN successfully negotiated SPDY. 238 // True if NPN successfully negotiated SPDY.
238 bool was_spdy_negotiated_; 239 bool was_spdy_negotiated_;
239 // Protocol that we negotiated with the server. 240 // Protocol that we negotiated with the server.
240 NextProto protocol_negotiated_; 241 NextProto protocol_negotiated_;
241 // True if a channel ID was sent. 242 // True if a channel ID was sent.
242 bool channel_id_sent_; 243 bool channel_id_sent_;
243 // True if SCTs were received via a TLS extension. 244 // True if SCTs were received via a TLS extension.
244 bool signed_cert_timestamps_received_; 245 bool signed_cert_timestamps_received_;
245 // True if a stapled OCSP response was received. 246 // True if a stapled OCSP response was received.
246 bool stapled_ocsp_response_received_; 247 bool stapled_ocsp_response_received_;
247 // Protocol negotiation extension used. 248 // Protocol negotiation extension used.
248 SSLNegotiationExtension negotiation_extension_; 249 SSLNegotiationExtension negotiation_extension_;
249 }; 250 };
250 251
251 } // namespace net 252 } // namespace net
252 253
253 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ 254 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_unittest.cc » ('j') | net/socket/ssl_client_socket_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698