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 #include "base/base64.h" | 5 #include "base/base64.h" |
6 #include "base/basictypes.h" | 6 #include "base/basictypes.h" |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
9 #include "base/strings/string_tokenizer.h" | 9 #include "base/strings/string_tokenizer.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 // "Public-Key-Pins-Report-Only" ":" | 373 // "Public-Key-Pins-Report-Only" ":" |
374 // [ "max-age" "=" delta-seconds ";" ] | 374 // [ "max-age" "=" delta-seconds ";" ] |
375 // "pin-" algo "=" base64 [ ";" ... ] | 375 // "pin-" algo "=" base64 [ ";" ... ] |
376 // [ ";" "includeSubdomains" ] | 376 // [ ";" "includeSubdomains" ] |
377 // [ ";" "report-uri" "=" uri-reference ] | 377 // [ ";" "report-uri" "=" uri-reference ] |
378 bool ParseHPKPReportOnlyHeader(const std::string& value, | 378 bool ParseHPKPReportOnlyHeader(const std::string& value, |
379 bool* include_subdomains, | 379 bool* include_subdomains, |
380 HashValueVector* hashes, | 380 HashValueVector* hashes, |
381 GURL* report_uri) { | 381 GURL* report_uri) { |
382 // max-age and includeSubdomains are irrelevant for Report-Only | 382 // max-age is irrelevant for Report-Only headers. |
383 // headers. | |
384 base::TimeDelta unused_max_age; | 383 base::TimeDelta unused_max_age; |
385 | 384 |
386 return ParseHPKPHeaderImpl(value, DO_NOT_REQUIRE_MAX_AGE, &unused_max_age, | 385 return ParseHPKPHeaderImpl(value, DO_NOT_REQUIRE_MAX_AGE, &unused_max_age, |
387 include_subdomains, hashes, report_uri); | 386 include_subdomains, hashes, report_uri); |
388 } | 387 } |
389 | 388 |
390 } // namespace net | 389 } // namespace net |
OLD | NEW |