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

Unified Diff: net/http/http_response_info.cc

Issue 2016143002: Expose when PKP is bypassed in SSLInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add pkp_bypassed to SSLInfo Created 4 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 side-by-side diff with in-line comments
Download patch
Index: net/http/http_response_info.cc
diff --git a/net/http/http_response_info.cc b/net/http/http_response_info.cc
index fe6e57e56e1924a889d8e3c4e53b025f08e2f9e3..546980958588a6a73a29721caa32c517508d32fd 100644
--- a/net/http/http_response_info.cc
+++ b/net/http/http_response_info.cc
@@ -96,6 +96,10 @@ enum {
// This bit is set if the response has a key-exchange-info field at the end.
RESPONSE_INFO_HAS_KEY_EXCHANGE_INFO = 1 << 22,
+ // This bit is set if ssl_info recorded that PKP was bypassed due to a local
+ // trust anchor
estark 2016/06/07 04:10:43 nit: period at the end
dadrian 2016/06/07 17:48:22 Done.
+ RESPONSE_INFO_PKP_BYPASSED = 1 << 23,
+
// TODO(darin): Add other bits to indicate alternate request methods.
// For now, we don't support storing those.
};
@@ -296,6 +300,8 @@ bool HttpResponseInfo::InitFromPickle(const base::Pickle& pickle,
unused_since_prefetch = (flags & RESPONSE_INFO_UNUSED_SINCE_PREFETCH) != 0;
+ ssl_info.pkp_bypassed = (flags & RESPONSE_INFO_PKP_BYPASSED);
estark 2016/06/07 04:10:43 nit: != 0 (for consistency with the lines above, p
dadrian 2016/06/07 17:48:22 Wow, I totally missed the `!= 0` on the other line
+
return true;
}
@@ -333,6 +339,8 @@ void HttpResponseInfo::Persist(base::Pickle* pickle,
flags |= RESPONSE_INFO_UNUSED_SINCE_PREFETCH;
if (!ssl_info.signed_certificate_timestamps.empty())
flags |= RESPONSE_INFO_HAS_SIGNED_CERTIFICATE_TIMESTAMPS;
+ if (ssl_info.pkp_bypassed)
+ flags |= RESPONSE_INFO_PKP_BYPASSED;
pickle->WriteInt(flags);
pickle->WriteInt64(request_time.ToInternalValue());

Powered by Google App Engine
This is Rietveld 408576698