 Chromium Code Reviews
 Chromium Code Reviews Issue 2144693004:
  Add the ability to send Expect-Staple reports.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@ocsp-verify-result
    
  
    Issue 2144693004:
  Add the ability to send Expect-Staple reports.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@ocsp-verify-result| 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. |