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

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

Issue 1211933005: Initial (partial) implementation of HPKP violation reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style fixes, comments Created 5 years, 6 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 | « net/http/certificate_report_sender_impl_unittest.cc ('k') | net/http/http_security_headers.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_HTTP_SECURITY_HEADERS_H_ 5 #ifndef NET_HTTP_HTTP_SECURITY_HEADERS_H_
6 #define NET_HTTP_HTTP_SECURITY_HEADERS_H_ 6 #define NET_HTTP_HTTP_SECURITY_HEADERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 // true and populates the |*max_age|, |*include_subdomains|, and |*hashes| 34 // true and populates the |*max_age|, |*include_subdomains|, and |*hashes|
35 // values. Otherwise returns false and leaves the output parameters 35 // values. Otherwise returns false and leaves the output parameters
36 // unchanged. 36 // unchanged.
37 // 37 //
38 // value is the right-hand side of: 38 // value is the right-hand side of:
39 // 39 //
40 // "Public-Key-Pins" ":" 40 // "Public-Key-Pins" ":"
41 // "max-age" "=" delta-seconds ";" 41 // "max-age" "=" delta-seconds ";"
42 // "pin-" algo "=" base64 [ ";" ... ] 42 // "pin-" algo "=" base64 [ ";" ... ]
43 // [ ";" "includeSubdomains" ] 43 // [ ";" "includeSubdomains" ]
44 // [ ";" "report-uri" "=" uri-reference ]
44 // 45 //
45 // For this function to return true, the key hashes specified by the HPKP 46 // For this function to return true, the key hashes specified by the HPKP
46 // header must pass two additional checks. There MUST be at least one key 47 // header must pass two additional checks. There MUST be at least one key
47 // hash which matches the SSL certificate chain of the current site (as 48 // hash which matches the SSL certificate chain of the current site (as
48 // specified by the chain_hashes) parameter. In addition, there MUST be at 49 // specified by the chain_hashes) parameter. In addition, there MUST be at
49 // least one key hash which does NOT match the site's SSL certificate chain 50 // least one key hash which does NOT match the site's SSL certificate chain
50 // (this is the "backup pin"). 51 // (this is the "backup pin").
51 bool NET_EXPORT_PRIVATE ParseHPKPHeader(const std::string& value, 52 bool NET_EXPORT_PRIVATE ParseHPKPHeader(const std::string& value,
52 const HashValueVector& chain_hashes, 53 const HashValueVector& chain_hashes,
53 base::TimeDelta* max_age, 54 base::TimeDelta* max_age,
54 bool* include_subdomains, 55 bool* include_subdomains,
55 HashValueVector* hashes); 56 HashValueVector* hashes,
57 std::string* report_uri);
56 58
57 } // namespace net 59 } // namespace net
58 60
59 #endif // NET_HTTP_HTTP_SECURITY_HEADERS_H_ 61 #endif // NET_HTTP_HTTP_SECURITY_HEADERS_H_
OLDNEW
« no previous file with comments | « net/http/certificate_report_sender_impl_unittest.cc ('k') | net/http/http_security_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698