diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-28 08:38:11 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-28 08:38:11 +0000 |
commit | cafe181ce22d75af581b96e590ad2b55fd5640d9 (patch) | |
tree | d8d28f61979af86dc6334309239a14f0b996772b /net | |
parent | ca8b9085f85a64aee83af8e0ceffa5211e1b2cef (diff) | |
download | chromium_src-cafe181ce22d75af581b96e590ad2b55fd5640d9.zip chromium_src-cafe181ce22d75af581b96e590ad2b55fd5640d9.tar.gz chromium_src-cafe181ce22d75af581b96e590ad2b55fd5640d9.tar.bz2 |
Allow X509CertificateTest.IntermediateCARequireExplicitPolicy to pass
after the certificate expires.
R=rsleevi@chromium.org
BUG=111742
TEST=net_unittests should pass
Review URL: http://codereview.chromium.org/9232067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/x509_certificate_unittest.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/base/x509_certificate_unittest.cc b/net/base/x509_certificate_unittest.cc index cb7a1c7..b7df5da 100644 --- a/net/base/x509_certificate_unittest.cc +++ b/net/base/x509_certificate_unittest.cc @@ -548,7 +548,9 @@ TEST(X509CertificateTest, CAFingerprints) { } // A regression test for http://crbug.com/31497. -// This certificate will expire on 2012-04-08. +// This certificate will expire on 2012-04-08. The test will still +// pass if error == ERR_CERT_DATE_INVALID. TODO(wtc): generate test +// certificates for this unit test. http://crbug.com/111742 TEST(X509CertificateTest, IntermediateCARequireExplicitPolicy) { FilePath certs_dir = GetTestCertsDirectory(); @@ -576,8 +578,12 @@ TEST(X509CertificateTest, IntermediateCARequireExplicitPolicy) { CertVerifyResult verify_result; int error = cert_chain->Verify("www.us.army.mil", flags, NULL, &verify_result); - EXPECT_EQ(OK, error); - EXPECT_EQ(0U, verify_result.cert_status); + if (error == OK) { + EXPECT_EQ(0U, verify_result.cert_status); + } else { + EXPECT_EQ(ERR_CERT_DATE_INVALID, error); + EXPECT_EQ(CERT_STATUS_DATE_INVALID, verify_result.cert_status); + } root_certs->Clear(); } |