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

Unified Diff: net/http/http_security_headers.h

Issue 1267513003: Add parsing for Public-Key-Pins-Report-Only header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix includeSubdomains comment 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 | « no previous file | net/http/http_security_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_security_headers.h
diff --git a/net/http/http_security_headers.h b/net/http/http_security_headers.h
index e03da85f38ffd36825b607bc2e9d6c08beb0785e..a447289009b71bf680b518dbb5015fae7fa9b5cd 100644
--- a/net/http/http_security_headers.h
+++ b/net/http/http_security_headers.h
@@ -33,9 +33,9 @@ bool NET_EXPORT_PRIVATE ParseHSTSHeader(const std::string& value,
bool* include_subdomains);
// Parses |value| as a Public-Key-Pins header value. If successful, returns
-// true and populates the |*max_age|, |*include_subdomains|, and |*hashes|
-// values. Otherwise returns false and leaves the output parameters
-// unchanged.
+// true and populates the |*max_age|, |*include_subdomains|, |*hashes|, and
+// |*report_uri| values. Otherwise returns false and leaves the output
+// parameters unchanged.
//
// value is the right-hand side of:
//
@@ -58,6 +58,23 @@ bool NET_EXPORT_PRIVATE ParseHPKPHeader(const std::string& value,
HashValueVector* hashes,
GURL* report_uri);
+// Parses |value| as a Public-Key-Pins-Report-Only header value. If
+// successful, returns true and populates the |*include_subdomains|,
+// |*hashes|, and |*report_uri| values. Otherwise returns false and
+// leaves the output parameters unchanged.
+//
+// value is the right-hand side of:
+//
+// "Public-Key-Pins-Report-Only" ":"
+// [ "max-age" "=" delta-seconds ";" ]
+// "pin-" algo "=" base64 [ ";" ... ]
+// [ ";" "includeSubdomains" ]
+// [ ";" "report-uri" "=" uri-reference ]
+//
+bool NET_EXPORT_PRIVATE ParseHPKPReportOnlyHeader(const std::string& value,
+ bool* include_subdomains,
+ HashValueVector* hashes,
+ GURL* report_uri);
} // namespace net
#endif // NET_HTTP_HTTP_SECURITY_HEADERS_H_
« no previous file with comments | « no previous file | net/http/http_security_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698