summaryrefslogtreecommitdiffstats
path: root/chrome/browser/page_info_model.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 15:23:54 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 15:23:54 +0000
commit03e09864d6b5738fab87b3d1e5aaeca35b0d08b6 (patch)
tree9c15dcd4f048b0f41b9a70d6b8ff683f2a36bb60 /chrome/browser/page_info_model.cc
parente72f5d7292734d8108549eaa85b5f27f87823634 (diff)
downloadchromium_src-03e09864d6b5738fab87b3d1e5aaeca35b0d08b6.zip
chromium_src-03e09864d6b5738fab87b3d1e5aaeca35b0d08b6.tar.gz
chromium_src-03e09864d6b5738fab87b3d1e5aaeca35b0d08b6.tar.bz2
Ignore revocation check failures from automated requests.
Extensions send requests without a TabContents, therefore we can't route SSL errors to their SSLManager. Since, without a UI, we have to make a static decision, this change makes it so that revocation check failures are ignored for these requests. BUG=86537 TEST=none Review URL: http://codereview.chromium.org/8201011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/page_info_model.cc')
-rw-r--r--chrome/browser/page_info_model.cc19
1 files changed, 6 insertions, 13 deletions
diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc
index de4b4c2..acbfab2 100644
--- a/chrome/browser/page_info_model.cc
+++ b/chrome/browser/page_info_model.cc
@@ -59,19 +59,12 @@ PageInfoModel::PageInfoModel(Profile* profile,
empty_subject_name = true;
}
- // Some of what IsCertStatusError classifies as errors we want to show as
- // warnings instead.
- static const int cert_warnings =
- net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION |
- net::CERT_STATUS_NO_REVOCATION_MECHANISM;
- int status_with_warnings_removed = ssl.cert_status() & ~cert_warnings;
-
if (ssl.cert_id() &&
CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), &cert) &&
- !net::IsCertStatusError(status_with_warnings_removed)) {
- // No error found so far, check cert_status warnings.
- net::CertStatus cert_status = ssl.cert_status();
- if (cert_status & cert_warnings) {
+ (!net::IsCertStatusError(ssl.cert_status()) ||
+ net::IsCertStatusMinorError(ssl.cert_status()))) {
+ // There are no major errors. Check for minor errors.
+ if (net::IsCertStatusMinorError(ssl.cert_status())) {
string16 issuer_name(UTF8ToUTF16(cert->issuer().GetDisplayName()));
if (issuer_name.empty()) {
issuer_name.assign(l10n_util::GetStringUTF16(
@@ -81,10 +74,10 @@ PageInfoModel::PageInfoModel(Profile* profile,
IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name));
description += ASCIIToUTF16("\n\n");
- if (cert_status & net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) {
+ if (ssl.cert_status() & net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) {
description += l10n_util::GetStringUTF16(
IDS_PAGE_INFO_SECURITY_TAB_UNABLE_TO_CHECK_REVOCATION);
- } else if (cert_status & net::CERT_STATUS_NO_REVOCATION_MECHANISM) {
+ } else if (ssl.cert_status() & net::CERT_STATUS_NO_REVOCATION_MECHANISM) {
description += l10n_util::GetStringUTF16(
IDS_PAGE_INFO_SECURITY_TAB_NO_REVOCATION_MECHANISM);
} else {