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

Unified Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 584463005: Add debugging information to the SSL blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/ssl/ssl_blocking_page.cc
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index f9aa36ae16bf1acb50a0e50826c794f1437161ba..77527dab94dfad689c5f28a9f5c3e3efbabcc3bd 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -511,6 +511,23 @@ std::string SSLBlockingPage::GetHTMLContents() {
"finalParagraph", l10n_util::GetStringFUTF16(help_string, url));
}
+ // Set debugging information at the bottom of the warning.
+ load_time_data.SetString(
+ "subject", ssl_info_.cert->subject().GetDisplayName());
+ load_time_data.SetString(
+ "issuer", ssl_info_.cert->issuer().GetDisplayName());
+ load_time_data.SetString(
+ "expirationDate",
+ base::TimeFormatShortDate(ssl_info_.cert->valid_expiry()));
+ load_time_data.SetString(
+ "currentDate", base::TimeFormatShortDate(now));
+ std::string printed_chain;
+ std::vector<std::string> encoded_chain;
+ ssl_info_.cert->GetPEMEncodedChain(&encoded_chain);
+ for (size_t i = 0; i < encoded_chain.size(); ++i)
+ printed_chain.append(encoded_chain[i]);
Bernhard Bauer 2014/09/19 08:40:35 I assume you're intentionally concatenating the st
felt 2014/09/20 15:47:02 I don't need to because the pem file format alread
+ load_time_data.SetString("pem", printed_chain);
+
base::StringPiece html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IRD_SECURITY_INTERSTITIAL_HTML));

Powered by Google App Engine
This is Rietveld 408576698