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

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: Compile after rebase 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
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // 1. The header value is "preload", indicating that the site wants to 442 // 1. The header value is "preload", indicating that the site wants to
443 // be opted in to Expect CT. 443 // be opted in to Expect CT.
444 // 2. The given host is present on the Expect CT preload list with a 444 // 2. The given host is present on the Expect CT preload list with a
445 // valid report-uri, and the build is timely (i.e. preload list is fresh). 445 // valid report-uri, and the build is timely (i.e. preload list is fresh).
446 // 3. |ssl_info| indicates that the connection violated the Expect CT policy. 446 // 3. |ssl_info| indicates that the connection violated the Expect CT policy.
447 // 4. An Expect CT reporter has been provided with SetExpectCTReporter(). 447 // 4. An Expect CT reporter has been provided with SetExpectCTReporter().
448 void ProcessExpectCTHeader(const std::string& value, 448 void ProcessExpectCTHeader(const std::string& value,
449 const HostPortPair& host_port_pair, 449 const HostPortPair& host_port_pair,
450 const SSLInfo& ssl_info); 450 const SSLInfo& ssl_info);
451 451
452 void ProcessExpectStaple(const HostPortPair& host_port_pair,
453 const SSLInfo& ssl_info,
454 const std::string& ocsp_response);
Ryan Sleevi 2016/07/19 00:02:49 Documentation is needed here. Just from the header
dadrian 2016/07/19 00:18:54 I modeled this after ProcessExpectCTHeader. It fol
455
452 // For unit tests only; causes ShouldRequireCT() to return |*required| 456 // For unit tests only; causes ShouldRequireCT() to return |*required|
453 // by default (that is, unless a RequireCTDelegate overrides). Set to 457 // by default (that is, unless a RequireCTDelegate overrides). Set to
454 // nullptr to reset. 458 // nullptr to reset.
455 static void SetShouldRequireCTForTesting(bool* required); 459 static void SetShouldRequireCTForTesting(bool* required);
456 460
457 private: 461 private:
458 friend class TransportSecurityStateTest; 462 friend class TransportSecurityStateTest;
459 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPOnly); 463 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPOnly);
460 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPMaxAge0); 464 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPMaxAge0);
461 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, NoClobberPins); 465 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, NoClobberPins);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 // rate-limiting. 580 // rate-limiting.
577 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> 581 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>>
578 sent_reports_cache_; 582 sent_reports_cache_;
579 583
580 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 584 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
581 }; 585 };
582 586
583 } // namespace net 587 } // namespace net
584 588
585 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 589 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/transport_security_state.cc » ('j') | net/http/transport_security_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698