| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 // the specified pins overlap with the certificate chain. | 284 // the specified pins overlap with the certificate chain. |
| 285 bool AddHPKPHeader(const std::string& host, const std::string& value, | 285 bool AddHPKPHeader(const std::string& host, const std::string& value, |
| 286 const SSLInfo& ssl_info); | 286 const SSLInfo& ssl_info); |
| 287 | 287 |
| 288 // Adds explicitly-specified data as if it was processed from an | 288 // Adds explicitly-specified data as if it was processed from an |
| 289 // HSTS header (used for net-internals and unit tests). | 289 // HSTS header (used for net-internals and unit tests). |
| 290 void AddHSTS(const std::string& host, | 290 void AddHSTS(const std::string& host, |
| 291 const base::Time& expiry, | 291 const base::Time& expiry, |
| 292 bool include_subdomains); | 292 bool include_subdomains); |
| 293 | 293 |
| 294 // Adds explicitly-specified data as if it was processed from an | 294 // Adds explicitly-specified data as if it was processed from an HPKP header. |
| 295 // HPKP header (used for net-internals and unit tests). | |
| 296 void AddHPKP(const std::string& host, | 295 void AddHPKP(const std::string& host, |
| 297 const base::Time& expiry, | 296 const base::Time& expiry, |
| 298 bool include_subdomains, | 297 bool include_subdomains, |
| 299 const HashValueVector& hashes, | 298 const HashValueVector& hashes, |
| 300 const GURL& report_uri); | 299 const GURL& report_uri); |
| 301 | 300 |
| 302 // Parses |value| as a Public-Key-Pins-Report-Only header value and | 301 // Parses |value| as a Public-Key-Pins-Report-Only header value and |
| 303 // sends a HPKP report for |host_port_pair| if |ssl_info| violates the | 302 // sends a HPKP report for |host_port_pair| if |ssl_info| violates the |
| 304 // pin. Returns true if |value| parses and includes a valid | 303 // pin. Returns true if |value| parses and includes a valid |
| 305 // report-uri, and false otherwise. | 304 // report-uri, and false otherwise. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 389 |
| 391 // True if static pins should be used. | 390 // True if static pins should be used. |
| 392 bool enable_static_pins_; | 391 bool enable_static_pins_; |
| 393 | 392 |
| 394 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 393 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 395 }; | 394 }; |
| 396 | 395 |
| 397 } // namespace net | 396 } // namespace net |
| 398 | 397 |
| 399 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 398 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |