| OLD | NEW |
| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // 1. The header value is "preload", indicating that the site wants to | 360 // 1. The header value is "preload", indicating that the site wants to |
| 361 // be opted in to Expect CT. | 361 // be opted in to Expect CT. |
| 362 // 2. The given host is present on the Expect CT preload list with a | 362 // 2. The given host is present on the Expect CT preload list with a |
| 363 // valid report-uri, and the build is timely (i.e. preload list is fresh). | 363 // valid report-uri, and the build is timely (i.e. preload list is fresh). |
| 364 // 3. |ssl_info| indicates that the connection violated the Expect CT policy. | 364 // 3. |ssl_info| indicates that the connection violated the Expect CT policy. |
| 365 // 4. An Expect CT reporter has been provided with SetExpectCTReporter(). | 365 // 4. An Expect CT reporter has been provided with SetExpectCTReporter(). |
| 366 void ProcessExpectCTHeader(const std::string& value, | 366 void ProcessExpectCTHeader(const std::string& value, |
| 367 const HostPortPair& host_port_pair, | 367 const HostPortPair& host_port_pair, |
| 368 const SSLInfo& ssl_info); | 368 const SSLInfo& ssl_info); |
| 369 | 369 |
| 370 // The maximum number of seconds for which we'll cache an HSTS request. | |
| 371 static const long int kMaxHSTSAgeSecs; | |
| 372 | |
| 373 private: | 370 private: |
| 374 friend class TransportSecurityStateTest; | 371 friend class TransportSecurityStateTest; |
| 375 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPOnly); | 372 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPOnly); |
| 376 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPMaxAge0); | 373 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPMaxAge0); |
| 377 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, NoClobberPins); | 374 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, NoClobberPins); |
| 378 FRIEND_TEST_ALL_PREFIXES(URLRequestTestHTTP, ExpectCTHeader); | 375 FRIEND_TEST_ALL_PREFIXES(URLRequestTestHTTP, ExpectCTHeader); |
| 379 | 376 |
| 380 typedef std::map<std::string, STSState> STSStateMap; | 377 typedef std::map<std::string, STSState> STSStateMap; |
| 381 typedef std::map<std::string, PKPState> PKPStateMap; | 378 typedef std::map<std::string, PKPState> PKPStateMap; |
| 382 | 379 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 // rate-limiting. | 471 // rate-limiting. |
| 475 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 472 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
| 476 sent_reports_cache_; | 473 sent_reports_cache_; |
| 477 | 474 |
| 478 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 475 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 479 }; | 476 }; |
| 480 | 477 |
| 481 } // namespace net | 478 } // namespace net |
| 482 | 479 |
| 483 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 480 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |