Chromium Code Reviews| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
| 295 // HPKP header (used for net-internals and unit tests). | 295 // HPKP header (used for net-internals and unit tests). |
| 296 void AddHPKP(const std::string& host, | 296 void AddHPKP(const std::string& host, |
| 297 const base::Time& expiry, | 297 const base::Time& expiry, |
| 298 bool include_subdomains, | 298 bool include_subdomains, |
| 299 const HashValueVector& hashes, | 299 const HashValueVector& hashes, |
| 300 const GURL& report_uri); | 300 const GURL& report_uri); |
| 301 | 301 |
| 302 // 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 | |
| 304 // pin. Returns true if |value| parses and includes a valid | |
| 305 // report-uri, and false otherwise. | |
|
Ryan Sleevi
2015/07/30 01:52:16
Grammar v parameter (which is fun to say), does it
estark
2015/07/31 00:49:44
Yeah, I think that makes sense; done.
| |
| 306 bool ProcessHPKPReportOnlyHeader(const HostPortPair& host_port_pair, | |
| 307 const std::string& value, | |
| 308 const SSLInfo& ssl_info); | |
| 309 | |
| 302 // Returns true iff we have any static public key pins for the |host| and | 310 // Returns true iff we have any static public key pins for the |host| and |
| 303 // iff its set of required pins is the set we expect for Google | 311 // iff its set of required pins is the set we expect for Google |
| 304 // properties. | 312 // properties. |
| 305 // | 313 // |
| 306 // If |host| matches both an exact entry and is a subdomain of another | 314 // If |host| matches both an exact entry and is a subdomain of another |
| 307 // entry, the exact match determines the return value. | 315 // entry, the exact match determines the return value. |
| 308 static bool IsGooglePinnedProperty(const std::string& host); | 316 static bool IsGooglePinnedProperty(const std::string& host); |
| 309 | 317 |
| 310 // The maximum number of seconds for which we'll cache an HSTS request. | 318 // The maximum number of seconds for which we'll cache an HSTS request. |
| 311 static const long int kMaxHSTSAgeSecs; | 319 static const long int kMaxHSTSAgeSecs; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 | 390 |
| 383 // True if static pins should be used. | 391 // True if static pins should be used. |
| 384 bool enable_static_pins_; | 392 bool enable_static_pins_; |
| 385 | 393 |
| 386 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 394 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 387 }; | 395 }; |
| 388 | 396 |
| 389 } // namespace net | 397 } // namespace net |
| 390 | 398 |
| 391 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 399 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |