diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 02:32:23 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 02:32:23 +0000 |
commit | 7c37a7b1ae7ff1df70303891757b09288a5ec743 (patch) | |
tree | 859344316fb63f9b45f39407b734cdf2282a91b0 /chrome/browser/ssl | |
parent | 8bb2fd7c8896ed389c6414f709381f641bdcd4f8 (diff) | |
download | chromium_src-7c37a7b1ae7ff1df70303891757b09288a5ec743.zip chromium_src-7c37a7b1ae7ff1df70303891757b09288a5ec743.tar.gz chromium_src-7c37a7b1ae7ff1df70303891757b09288a5ec743.tar.bz2 |
Display the SECURITY_WARNING status in the location bar for the
ERR_CERT_UNABLE_TO_CHECK_REVOCATION certificate error. Do not
display an info bar.
Remove the unused ToolbarModel::GetIconHoverText function.
R=pkasting,jcivelli
BUG=27125
TEST=Visit port 452 on the chrometws server.
Review URL: http://codereview.chromium.org/1653003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r-- | chrome/browser/ssl/ssl_browser_tests.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_policy.cc | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index fb3d447..d6ef458 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -65,6 +65,9 @@ class SSLUITest : public InProcessBrowserTest { entry->page_type()); EXPECT_EQ(SECURITY_STYLE_AUTHENTICATION_BROKEN, entry->ssl().security_style()); + // CERT_STATUS_UNABLE_TO_CHECK_REVOCATION doesn't lower the security style + // to SECURITY_STYLE_AUTHENTICATION_BROKEN. + ASSERT_NE(net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION, error); EXPECT_EQ(error, entry->ssl().cert_status() & net::CERT_STATUS_ALL_ERRORS); EXPECT_FALSE(entry->ssl().has_mixed_content()); EXPECT_FALSE(entry->ssl().has_unsafe_content()); diff --git a/chrome/browser/ssl/ssl_policy.cc b/chrome/browser/ssl/ssl_policy.cc index 2f21e5d..5f15772 100644 --- a/chrome/browser/ssl/ssl_policy.cc +++ b/chrome/browser/ssl/ssl_policy.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -67,10 +67,9 @@ void SSLPolicy::OnCertError(SSLCertErrorHandler* handler) { handler->ContinueRequest(); break; case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: - // We ignore this error and display an infobar. + // We ignore this error but will show a warning status in the location + // bar. handler->ContinueRequest(); - backend_->ShowMessage(l10n_util::GetString( - IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_INFO_BAR)); break; case net::ERR_CERT_CONTAINS_ERRORS: case net::ERR_CERT_REVOKED: @@ -127,8 +126,12 @@ void SSLPolicy::UpdateEntry(NavigationEntry* entry) { return; } - if (net::IsCertStatusError(entry->ssl().cert_status())) { - entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN); + // If CERT_STATUS_UNABLE_TO_CHECK_REVOCATION is the only certificate error, + // don't lower the security style to SECURITY_STYLE_AUTHENTICATION_BROKEN. + int cert_errors = entry->ssl().cert_status() & net::CERT_STATUS_ALL_ERRORS; + if (cert_errors) { + if (cert_errors != net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) + entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN); return; } |