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

Unified 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: More test cleanups. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/transport_security_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/transport_security_state.h
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h
index d5283712c57ae28e53a6f63cecd722c136bc7a19..22491f2ae38bdb570e56ac9d2328b2645eb19fbe 100644
--- a/net/http/transport_security_state.h
+++ b/net/http/transport_security_state.h
@@ -303,6 +303,19 @@ class NET_EXPORT TransportSecurityState
std::string* failure_log);
bool HasPublicKeyPins(const std::string& host);
+ // Sends an Expect-Staple report containing the raw |ocsp_response| for
+ // |host_port_pair| if the following conditions are true:
+ // 1. Sending Expect-Staple reports is enabled (via
+ // |enable_static_expect_staple_|)
+ // 2. A report sender was provided via SetReportSender().
+ // 3. The build is timele (i.e. the preload list is fresh).
+ // 4. The given host is present on the Expect-Staple preload list.
+ // 5. |ssl_info| indicates the connection did not provide an OCSP response
+ // indicating a revocation status of GOOD.
+ void CheckExpectStaple(const HostPortPair& host_port_pair,
+ const SSLInfo& ssl_info,
+ const std::string& ocsp_response);
+
// Returns true if connections to |host|, using the validated certificate
// |validated_certificate_chain|, are expected to be accompanied with
// valid Certificate Transparency information that complies with the
@@ -449,6 +462,19 @@ class NET_EXPORT TransportSecurityState
const HostPortPair& host_port_pair,
const SSLInfo& ssl_info);
+ // Sends an Expect-Staple report containing the raw |ocsp_response| for
+ // |host_port_pair| if the following conditions are true:
+ // 1. Sending Expect-Staple reports is enabled (via
+ // |enable_static_expect_staple_|)
+ // 2. A report sender was provided via SetReportSender().
+ // 3. The build is timele (i.e. the preload list is fresh).
+ // 4. The given host is present on the Expect-Staple preload list.
+ // 5. |ssl_info| indicates the connection did not provide an OCSP response
+ // indicating a revocation status of GOOD.
+ void CheckExpectStapleAndMaybeSendReport(const HostPortPair& host_port_pair,
Ryan Sleevi 2016/07/19 21:24:56 Leftover? :)
+ const SSLInfo& ssl_info,
+ const std::string& ocsp_response);
+
// For unit tests only; causes ShouldRequireCT() to return |*required|
// by default (that is, unless a RequireCTDelegate overrides). Set to
// nullptr to reset.
« 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