Index: chrome/browser/page_info_model.cc |
diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc |
index 365852f46b2d52b7edfb769797fba2fd9f992a7a..e49722202e65292823d54c32eb879ac6bf196722 100644 |
--- a/chrome/browser/page_info_model.cc |
+++ b/chrome/browser/page_info_model.cc |
@@ -55,10 +55,12 @@ PageInfoModel::PageInfoModel(Profile* profile, |
net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION | |
net::CERT_STATUS_NO_REVOCATION_MECHANISM; |
int status_with_warnings_removed = ssl.cert_status() & ~cert_warnings; |
+ bool show_secure_identity_msg = false; |
if (ssl.cert_id() && |
CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), &cert) && |
!net::IsCertStatusError(status_with_warnings_removed)) { |
+ show_secure_identity_msg = true; |
// No error found so far, check cert_status warnings. |
int cert_status = ssl.cert_status(); |
if (cert_status & cert_warnings) { |
@@ -133,9 +135,17 @@ PageInfoModel::PageInfoModel(Profile* profile, |
description.assign(l10n_util::GetStringFUTF16( |
IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name)); |
} |
- } else { |
+ if (!ssl.tls_username().empty()) { |
+ description += ASCIIToUTF16("\n\n"); |
+ description += l10n_util::GetStringUTF16( |
+ IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_PLUS_SHARED_SECRET); |
+ } |
+ } else if (ssl.tls_username().empty() || |
+ (!ssl.tls_username().empty() && ssl.cert_id())) { |
// HTTP or HTTPS with errors (not warnings). |
description.assign(l10n_util::GetStringUTF16( |
+ ssl.cert_id() && !ssl.tls_username().empty() ? |
+ IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_BAD_CERT_OK_SHARED_SECRET : |
IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY)); |
icon_id = ssl.security_style() == SECURITY_STYLE_UNAUTHENTICATED ? |
ICON_STATE_WARNING_MAJOR : ICON_STATE_ERROR; |
@@ -154,7 +164,20 @@ PageInfoModel::PageInfoModel(Profile* profile, |
description += l10n_util::GetStringUTF16( |
IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME); |
} |
+ } else if (!ssl.tls_username().empty()) { |
+ // HTTPS with TLS-SRP (with no certificate) |
+ if (!description.empty()) |
+ description += ASCIIToUTF16("\n\n"); |
+ description += l10n_util::GetStringUTF16( |
+ IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_SHARED_SECRET); |
} |
+ |
+ if (!ssl.tls_username().empty()) { |
+ description += ASCIIToUTF16("\n\n"); |
+ description += l10n_util::GetStringFUTF16( |
+ IDS_PAGE_INFO_TLS_USER_IDENTITY, subject_name, ssl.tls_username()); |
+ } |
+ |
sections_.push_back(SectionInfo( |
icon_id, |
headline, |
@@ -168,7 +191,7 @@ PageInfoModel::PageInfoModel(Profile* profile, |
icon_id = ICON_STATE_OK; |
headline.clear(); |
description.clear(); |
- if (!ssl.cert_id()) { |
+ if (!ssl.cert_id() && ssl.tls_username().empty()) { |
// Not HTTPS. |
DCHECK_EQ(ssl.security_style(), SECURITY_STYLE_UNAUTHENTICATED); |
icon_id = ssl.security_style() == SECURITY_STYLE_UNAUTHENTICATED ? |