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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 1266723003: Process Public-Key-Pin-Report-Only headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: davidben comments 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_state_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 019a0a76caec400b52e2a422923f29a0b3105a69..318aa4f44a787dd8791fb7ca4aec525d9fff4844 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -883,15 +883,20 @@ void URLRequestHttpJob::ProcessPublicKeyPinsHeader() {
if (request_info_.url.HostIsIPAddress())
return;
- // http://tools.ietf.org/html/draft-ietf-websec-key-pinning:
+ // http://tools.ietf.org/html/rfc7469:
//
// If a UA receives more than one PKP header field in an HTTP
// response message over secure transport, then the UA MUST process
// only the first such header field.
HttpResponseHeaders* headers = GetResponseHeaders();
std::string value;
- if (headers->EnumerateHeader(NULL, "Public-Key-Pins", &value))
+ if (headers->EnumerateHeader(nullptr, "Public-Key-Pins", &value))
security_state->AddHPKPHeader(request_info_.url.host(), value, ssl_info);
+ if (headers->EnumerateHeader(nullptr, "Public-Key-Pins-Report-Only",
+ &value)) {
+ security_state->ProcessHPKPReportOnlyHeader(
+ value, HostPortPair::FromURL(request_info_.url), ssl_info);
+ }
}
void URLRequestHttpJob::OnStartCompleted(int result) {
« no previous file with comments | « net/http/transport_security_state_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698