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

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

Issue 949633002: Include both certificate chains in invalid cert reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a comment to cert logger pb Created 5 years, 10 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
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // inadequate TLS version. 220 // inadequate TLS version.
221 static bool IsTLSVersionAdequateForHTTP2(const SSLConfig& ssl_config); 221 static bool IsTLSVersionAdequateForHTTP2(const SSLConfig& ssl_config);
222 222
223 // Serializes |next_protos| in the wire format for ALPN: protocols are listed 223 // Serializes |next_protos| in the wire format for ALPN: protocols are listed
224 // in order, each prefixed by a one-byte length. Any HTTP/2 protocols in 224 // in order, each prefixed by a one-byte length. Any HTTP/2 protocols in
225 // |next_protos| are ignored if |can_advertise_http2| is false. 225 // |next_protos| are ignored if |can_advertise_http2| is false.
226 static std::vector<uint8_t> SerializeNextProtos( 226 static std::vector<uint8_t> SerializeNextProtos(
227 const NextProtoVector& next_protos, 227 const NextProtoVector& next_protos,
228 bool can_advertise_http2); 228 bool can_advertise_http2);
229 229
230 // For unit testing only.
231 // Returns the unverified certificate chain as presented by server.
232 // Note that chain may be different than the verified chain returned by
233 // StreamSocket::GetSSLInfo().
234 virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
235 const = 0;
236
237 private: 230 private:
238 FRIEND_TEST_ALL_PREFIXES(SSLClientSocket, SerializeNextProtos); 231 FRIEND_TEST_ALL_PREFIXES(SSLClientSocket, SerializeNextProtos);
239 // For signed_cert_timestamps_received_ and stapled_ocsp_response_received_. 232 // For signed_cert_timestamps_received_ and stapled_ocsp_response_received_.
240 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 233 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
241 ConnectSignedCertTimestampsEnabledTLSExtension); 234 ConnectSignedCertTimestampsEnabledTLSExtension);
242 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 235 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
243 ConnectSignedCertTimestampsEnabledOCSP); 236 ConnectSignedCertTimestampsEnabledOCSP);
244 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 237 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
245 ConnectSignedCertTimestampsDisabled); 238 ConnectSignedCertTimestampsDisabled);
246 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest, 239 FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
(...skipping 11 matching lines...) Expand all
258 bool signed_cert_timestamps_received_; 251 bool signed_cert_timestamps_received_;
259 // True if a stapled OCSP response was received. 252 // True if a stapled OCSP response was received.
260 bool stapled_ocsp_response_received_; 253 bool stapled_ocsp_response_received_;
261 // Protocol negotiation extension used. 254 // Protocol negotiation extension used.
262 SSLNegotiationExtension negotiation_extension_; 255 SSLNegotiationExtension negotiation_extension_;
263 }; 256 };
264 257
265 } // namespace net 258 } // namespace net
266 259
267 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ 260 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698