summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl/ssl_policy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ssl/ssl_policy.cc')
-rw-r--r--chrome/browser/ssl/ssl_policy.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/ssl/ssl_policy.cc b/chrome/browser/ssl/ssl_policy.cc
index 9b4a6e9..7f3ad87 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;
}