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

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: Using JoinString now 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
« no previous file with comments | « chrome/browser/resources/security_warnings/ssl.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fbafc59e1ff3bbc4a37d65d2c04cad38d46d4a2c 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -13,6 +13,7 @@
#include "base/process/launch.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
+#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
@@ -511,6 +512,20 @@ 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::vector<std::string> encoded_chain;
+ ssl_info_.cert->GetPEMEncodedChain(&encoded_chain);
+ load_time_data.SetString("pem", JoinString(encoded_chain, '\0'));
Bernhard Bauer 2014/09/22 09:13:27 Urr... does that actually work? JoinString does ha
felt 2014/09/22 16:29:02 Indeed it does work. I can't find the overload any
Bernhard Bauer 2014/09/22 19:19:27 https://code.google.com/p/chromium/codesearch#chro
felt 2014/09/22 20:25:49 Ohh I misunderstood. Fixed.
+
base::StringPiece html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IRD_SECURITY_INTERSTITIAL_HTML));
« no previous file with comments | « chrome/browser/resources/security_warnings/ssl.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698