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

Unified Diff: net/base/x509_certificate_unittest.cc

Issue 7037031: Added EV policy OID and root sha1 fingerprint for GlobalSign Root CA - R3 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: I disabled the unit test because it fails when ./netunittests is run. Created 9 years, 7 months 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
Index: net/base/x509_certificate_unittest.cc
===================================================================
--- net/base/x509_certificate_unittest.cc (revision 85710)
+++ net/base/x509_certificate_unittest.cc (working copy)
@@ -486,6 +486,38 @@
root_certs->Clear();
}
+// Test for bug 58437.
+// This certificate will expire on 2011-12-21. The test will still
+// pass if error == ERR_CERT_DATE_INVALID.
wtc 2011/05/20 00:34:08 Please add a comment to explain why this test is d
rkn1 2011/05/20 17:48:36 Done.
+TEST(X509CertificateTest, DISABLED_GlobalSignR3EVTest) {
+ FilePath certs_dir = GetTestCertsDirectory();
+
+ scoped_refptr<X509Certificate> server_cert =
+ ImportCertFromFile(certs_dir, "2029_globalsign_com_cert.pem");
+ ASSERT_NE(static_cast<X509Certificate*>(NULL), server_cert);
+
+ scoped_refptr<X509Certificate> intermediate_cert =
+ ImportCertFromFile(certs_dir,
+ "2029_globalsign_extended_validation_sha256_ca_cert.pem");
+ ASSERT_NE(static_cast<X509Certificate*>(NULL), intermediate_cert);
+
+ X509Certificate::OSCertHandles intermediates;
+ intermediates.push_back(intermediate_cert->os_cert_handle());
+ scoped_refptr<X509Certificate> cert_chain =
+ X509Certificate::CreateFromHandle(server_cert->os_cert_handle(),
+ X509Certificate::SOURCE_FROM_NETWORK,
+ intermediates);
+
+ CertVerifyResult verify_result;
+ int flags = X509Certificate::VERIFY_REV_CHECKING_ENABLED |
+ X509Certificate::VERIFY_EV_CERT;
+ int error = cert_chain->Verify("2029.globalsign.com", flags, &verify_result);
+ if (error == OK)
+ EXPECT_NE(0, verify_result.cert_status & CERT_STATUS_IS_EV);
+ else
+ EXPECT_EQ(ERR_CERT_DATE_INVALID, error);
+}
+
TEST(X509CertificateTest, TestKnownRoot) {
FilePath certs_dir = GetTestCertsDirectory();
scoped_refptr<X509Certificate> cert =

Powered by Google App Engine
This is Rietveld 408576698