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

Unified Diff: net/http/transport_security_state.h

Issue 1211363005: Parse HPKP report-uri and persist in TransportSecurityPersister (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GetNext() fix Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/transport_security_persister_unittest.cc ('k') | net/http/transport_security_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/transport_security_state.h
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h
index b441763cb082334c61120bfa7cfb91fba30d59c6..2f97d9d34e5a6a20be27b1bcb1b96bbbad56c187 100644
--- a/net/http/transport_security_state.h
+++ b/net/http/transport_security_state.h
@@ -17,6 +17,7 @@
#include "net/base/net_export.h"
#include "net/cert/x509_cert_types.h"
#include "net/cert/x509_certificate.h"
+#include "url/gurl.h"
namespace net {
@@ -130,6 +131,10 @@ class NET_EXPORT TransportSecurityState
// Updated by |GetDynamicPKPState| and |GetStaticDomainState|.
std::string domain;
+ // An optional URI indicating where reports should be sent when this
+ // pin is violated, or empty when omitted.
+ GURL report_uri;
+
// Takes a set of SubjectPublicKeyInfo |hashes| and returns true if:
// 1) |bad_static_spki_hashes| does not intersect |hashes|; AND
// 2) Both |static_spki_hashes| and |dynamic_spki_hashes| are empty
@@ -268,7 +273,8 @@ class NET_EXPORT TransportSecurityState
void AddHPKP(const std::string& host,
const base::Time& expiry,
bool include_subdomains,
- const HashValueVector& hashes);
+ const HashValueVector& hashes,
+ const GURL& report_uri);
// Returns true iff we have any static public key pins for the |host| and
// iff its set of required pins is the set we expect for Google
@@ -325,7 +331,8 @@ class NET_EXPORT TransportSecurityState
const base::Time& last_observed,
const base::Time& expiry,
bool include_subdomains,
- const HashValueVector& hashes);
+ const HashValueVector& hashes,
+ const GURL& report_uri);
// Enable TransportSecurity for |host|. |state| supercedes any previous
// state for the |host|, including static entries.
« no previous file with comments | « net/http/transport_security_persister_unittest.cc ('k') | net/http/transport_security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698