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

Unified Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 703143003: Show something more useful than the number of bits in the cipher key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... Created 6 years, 1 month 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/app/generated_resources.grd ('k') | chrome/browser/ui/website_settings/website_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/website_settings.cc
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index ac71f0eb51dd21bb5c510a6248e76f1ce5ef48a3..bbef28dcace84254db9320735adb544e643ec63a 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -547,17 +547,22 @@ void WebsiteSettings::Init(Profile* profile,
site_connection_details_.assign(l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT,
subject_name));
- } else if (ssl.security_bits < 80) {
- site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR;
- site_connection_details_.assign(l10n_util::GetStringFUTF16(
- IDS_PAGE_INFO_SECURITY_TAB_WEAK_ENCRYPTION_CONNECTION_TEXT,
- subject_name));
} else {
site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED;
- site_connection_details_.assign(l10n_util::GetStringFUTF16(
- IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT,
- subject_name,
- base::IntToString16(ssl.security_bits)));
+
+ if (net::SSLConnectionStatusToVersion(ssl.connection_status) >=
+ net::SSL_CONNECTION_VERSION_TLS1_2 &&
+ net::IsSecureTLSCipherSuite(
+ net::SSLConnectionStatusToCipherSuite(ssl.connection_status))) {
+ site_connection_details_.assign(l10n_util::GetStringFUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT,
+ subject_name));
+ } else {
+ site_connection_details_.assign(l10n_util::GetStringFUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_WEAK_ENCRYPTION_CONNECTION_TEXT,
+ subject_name));
+ }
+
if (ssl.content_status) {
bool ran_insecure_content =
!!(ssl.content_status & content::SSLStatus::RAN_INSECURE_CONTENT);
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/website_settings/website_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698