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

Unified Diff: chrome/browser/page_info_model.cc

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove "httpsv" scheme, minor NSS/OpenSSL changes Created 9 years, 8 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/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 ?
« no previous file with comments | « chrome/browser/load_from_memory_cache_details.cc ('k') | chrome/browser/renderer_host/resource_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698