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

Unified Diff: chrome/browser/ui/webui/interstitials/interstitial_ui.cc

Issue 2957953002: Add pinned cert interstitial to chrome://interstitials (Closed)
Patch Set: Make pinned certificate error variable name more specific Created 3 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: chrome/browser/ui/webui/interstitials/interstitial_ui.cc
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
index 9c5f0cabab111df2ec4ec93f00805417cdb115a7..d85f75dfa9904505f5c2b05cf476954b76090892 100644
--- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -137,8 +137,9 @@ SSLBlockingPage* CreateSSLBlockingPage(content::WebContents* web_contents) {
if (net::GetValueForKeyInQuery(web_contents->GetURL(),
"url",
&url_param)) {
- if (GURL(url_param).is_valid())
+ if (GURL(url_param).is_valid()) {
request_url = GURL(url_param);
+ }
}
std::string overridable_param;
if (net::GetValueForKeyInQuery(web_contents->GetURL(),
@@ -152,6 +153,12 @@ SSLBlockingPage* CreateSSLBlockingPage(content::WebContents* web_contents) {
&strict_enforcement_param)) {
strict_enforcement = strict_enforcement_param == "1";
}
+ std::string type_param;
+ if (net::GetValueForKeyInQuery(web_contents->GetURL(), "type", &type_param)) {
+ if (type_param == "pinned_cert") {
lgarron 2017/06/27 20:41:44 This should match `hpkp_failure` below, right?
sperigo 2017/06/27 21:31:27 Oops! Definitely.
+ cert_error = net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN;
+ }
+ }
net::SSLInfo ssl_info;
ssl_info.cert = ssl_info.unverified_cert = CreateFakeCert();
// This delegate doesn't create an interstitial.
@@ -224,8 +231,9 @@ safe_browsing::SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
if (net::GetValueForKeyInQuery(web_contents->GetURL(),
"url",
&url_param)) {
- if (GURL(url_param).is_valid())
+ if (GURL(url_param).is_valid()) {
request_url = GURL(url_param);
+ }
}
GURL main_frame_url(request_url);
// TODO(mattm): add flag to change main_frame_url or add dedicated flag to

Powered by Google App Engine
This is Rietveld 408576698