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

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: Brackets for multi-line if 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') | net/cert/x509_certificate_ios.cc » ('j') | 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 391c670ad1581ede794ce2874be539b4ec4466ac..8eb5375c02c34f962f85fb4097decaf156f8ba61 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, std::string()));
+
base::StringPiece html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IRD_SECURITY_INTERSTITIAL_HTML));
« no previous file with comments | « chrome/browser/resources/security_warnings/ssl.js ('k') | net/cert/x509_certificate_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698