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

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

Issue 2957953002: Add pinned cert interstitial to chrome://interstitials (Closed)
Patch Set: Address CL comments 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9af377e1b039ea1aa2ce14d9e7ccbb8e794fdd6d 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 == "hpkp_failure") {
+ 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698