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

Side by Side Diff: net/http/transport_security_state.h

Issue 2144693004: Add the ability to send Expect-Staple reports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocsp-verify-result
Patch Set: Make switch statements Android/ChromeOS friendly Created 4 years, 5 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
« no previous file with comments | « no previous file | net/http/transport_security_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_HTTP_TRANSPORT_SECURITY_STATE_H_ 5 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_
6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 PKPStatus CheckPublicKeyPins( 296 PKPStatus CheckPublicKeyPins(
297 const HostPortPair& host_port_pair, 297 const HostPortPair& host_port_pair,
298 bool is_issued_by_known_root, 298 bool is_issued_by_known_root,
299 const HashValueVector& hashes, 299 const HashValueVector& hashes,
300 const X509Certificate* served_certificate_chain, 300 const X509Certificate* served_certificate_chain,
301 const X509Certificate* validated_certificate_chain, 301 const X509Certificate* validated_certificate_chain,
302 const PublicKeyPinReportStatus report_status, 302 const PublicKeyPinReportStatus report_status,
303 std::string* failure_log); 303 std::string* failure_log);
304 bool HasPublicKeyPins(const std::string& host); 304 bool HasPublicKeyPins(const std::string& host);
305 305
306 // Sends an Expect-Staple report containing the raw |ocsp_response| for
307 // |host_port_pair| if the following conditions are true:
308 // 1. Sending Expect-Staple reports is enabled (via
309 // |enable_static_expect_staple_|)
310 // 2. A report sender was provided via SetReportSender().
311 // 3. The build is timele (i.e. the preload list is fresh).
312 // 4. The given host is present on the Expect-Staple preload list.
313 // 5. |ssl_info| indicates the connection did not provide an OCSP response
314 // indicating a revocation status of GOOD.
315 void CheckExpectStaple(const HostPortPair& host_port_pair,
316 const SSLInfo& ssl_info,
317 const std::string& ocsp_response);
318
306 // Returns true if connections to |host|, using the validated certificate 319 // Returns true if connections to |host|, using the validated certificate
307 // |validated_certificate_chain|, are expected to be accompanied with 320 // |validated_certificate_chain|, are expected to be accompanied with
308 // valid Certificate Transparency information that complies with the 321 // valid Certificate Transparency information that complies with the
309 // connection's CTPolicyEnforcer. 322 // connection's CTPolicyEnforcer.
310 // 323 //
311 // The behavior may be further be altered by setting a RequireCTDelegate 324 // The behavior may be further be altered by setting a RequireCTDelegate
312 // via |SetRequireCTDelegate()|. 325 // via |SetRequireCTDelegate()|.
313 bool ShouldRequireCT(const std::string& host, 326 bool ShouldRequireCT(const std::string& host,
314 const X509Certificate* validated_certificate_chain, 327 const X509Certificate* validated_certificate_chain,
315 const HashValueVector& hashes); 328 const HashValueVector& hashes);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 // rate-limiting. 589 // rate-limiting.
577 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> 590 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>>
578 sent_reports_cache_; 591 sent_reports_cache_;
579 592
580 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 593 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
581 }; 594 };
582 595
583 } // namespace net 596 } // namespace net
584 597
585 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 598 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/transport_security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698