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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // the specified pins overlap with the certificate chain. | 285 // the specified pins overlap with the certificate chain. |
286 bool AddHPKPHeader(const std::string& host, const std::string& value, | 286 bool AddHPKPHeader(const std::string& host, const std::string& value, |
287 const SSLInfo& ssl_info); | 287 const SSLInfo& ssl_info); |
288 | 288 |
289 // Adds explicitly-specified data as if it was processed from an | 289 // Adds explicitly-specified data as if it was processed from an |
290 // HSTS header (used for net-internals and unit tests). | 290 // HSTS header (used for net-internals and unit tests). |
291 void AddHSTS(const std::string& host, | 291 void AddHSTS(const std::string& host, |
292 const base::Time& expiry, | 292 const base::Time& expiry, |
293 bool include_subdomains); | 293 bool include_subdomains); |
294 | 294 |
295 // Adds explicitly-specified data as if it was processed from an | 295 // Adds explicitly-specified data as if it was processed from an HPKP header. |
296 // HPKP header (used for net-internals and unit tests). | |
297 void AddHPKP(const std::string& host, | 296 void AddHPKP(const std::string& host, |
298 const base::Time& expiry, | 297 const base::Time& expiry, |
299 bool include_subdomains, | 298 bool include_subdomains, |
300 const HashValueVector& hashes, | 299 const HashValueVector& hashes, |
301 const GURL& report_uri); | 300 const GURL& report_uri); |
302 | 301 |
303 // Parses |value| as a Public-Key-Pins-Report-Only header value and | 302 // Parses |value| as a Public-Key-Pins-Report-Only header value and |
304 // sends a HPKP report for |host_port_pair| if |ssl_info| violates the | 303 // sends a HPKP report for |host_port_pair| if |ssl_info| violates the |
305 // pin. Returns true if |value| parses and includes a valid | 304 // pin. Returns true if |value| parses and includes a valid |
306 // report-uri, and false otherwise. | 305 // report-uri, and false otherwise. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 // rate-limiting. | 403 // rate-limiting. |
405 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 404 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
406 sent_reports_cache_; | 405 sent_reports_cache_; |
407 | 406 |
408 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 407 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
409 }; | 408 }; |
410 | 409 |
411 } // namespace net | 410 } // namespace net |
412 | 411 |
413 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 412 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
OLD | NEW |