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

Unified Diff: components/ssl_errors/error_info.cc

Issue 2868733003: Improve HTTPS error page text when SubjectAltName missing (Closed)
Patch Set: Created 3 years, 7 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 | components/ssl_errors_strings.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ssl_errors/error_info.cc
diff --git a/components/ssl_errors/error_info.cc b/components/ssl_errors/error_info.cc
index ab7afccb05cfa37c20d9d09d15700aedaed06a93..a6bed5cea72174cb9bdc1f057c25264d6c796af1 100644
--- a/components/ssl_errors/error_info.cc
+++ b/components/ssl_errors/error_info.cc
@@ -38,9 +38,9 @@ ErrorInfo ErrorInfo::CreateError(ErrorType error_type,
size_t i = 0;
if (dns_names.empty()) {
// The certificate had no DNS names, display an explanatory string.
- // TODO(elawrence): Change the error messsage instead of just the
- // placeholder string; see https://crbug.com/708268
- dns_names.push_back("[missing_subjectAltName]");
+ details = l10n_util::GetStringFUTF16(
+ IDS_CERT_ERROR_NO_SUBJECT_ALTERNATIVE_NAMES_DETAILS,
+ UTF8ToUTF16(request_url.host()));
} else {
// If the certificate contains multiple DNS names, we choose the most
// representative one -- either the DNS name that's also in the subject
@@ -54,12 +54,13 @@ ErrorInfo ErrorInfo::CreateError(ErrorType error_type,
}
if (i == dns_names.size())
i = 0;
+
+ details = l10n_util::GetStringFUTF16(
+ IDS_CERT_ERROR_COMMON_NAME_INVALID_DETAILS,
+ UTF8ToUTF16(request_url.host()),
+ net::EscapeForHTML(UTF8ToUTF16(dns_names[i])));
}
- details = l10n_util::GetStringFUTF16(
- IDS_CERT_ERROR_COMMON_NAME_INVALID_DETAILS,
- UTF8ToUTF16(request_url.host()),
- net::EscapeForHTML(UTF8ToUTF16(dns_names[i])));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_COMMON_NAME_INVALID_DESCRIPTION);
break;
« no previous file with comments | « no previous file | components/ssl_errors_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698