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

Side by Side Diff: net/http/transport_security_state.h

Issue 1266723003: Process Public-Key-Pin-Report-Only headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: davidben comments Created 5 years, 4 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
« no previous file with comments | « no previous file | net/http/transport_security_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
306 bool ProcessHPKPReportOnlyHeader(const std::string& value,
307 const HostPortPair& host_port_pair,
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
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_
OLDNEW
« no previous file with comments | « no previous file | net/http/transport_security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698