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

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

Issue 1266723003: Process Public-Key-Pin-Report-Only headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rsleevi 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
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 #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
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
OLDNEW
« no previous file with comments | « no previous file | net/http/transport_security_state.h » ('j') | net/http/transport_security_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698