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

Unified Diff: net/cert/cert_verify_proc_whitelist_unittest.cc

Issue 2509613002: Distrust new WoSign/StartCom certificates (Closed)
Patch Set: Re-run net/data/update_net_gypi.py Created 4 years, 1 month 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
« no previous file with comments | « net/cert/cert_verify_proc_whitelist.cc ('k') | net/data/ssl/certificates/README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_whitelist_unittest.cc
diff --git a/net/cert/cert_verify_proc_whitelist_unittest.cc b/net/cert/cert_verify_proc_whitelist_unittest.cc
index dea54129ba870e2fcce6cd9f88eef6fa26e63e86..791957315a633a17052c3c2e619d36ca7883e8f6 100644
--- a/net/cert/cert_verify_proc_whitelist_unittest.cc
+++ b/net/cert/cert_verify_proc_whitelist_unittest.cc
@@ -184,6 +184,25 @@ TEST(CertVerifyProcWhitelistTest, AcceptsUnconstrainedLeaf) {
SetCertificateWhitelistForTesting(nullptr, 0);
}
+TEST(CertVerifyProcWhitelistTest, HandlesWosignCerts) {
+ scoped_refptr<X509Certificate> cert =
+ ImportCertFromFile(GetTestCertsDirectory(), "wosign_before_oct_21.pem");
+ ASSERT_TRUE(cert);
+
+ HashValueVector public_key_hashes;
+ public_key_hashes.emplace_back(SHA256HashValue{
+ {0x15, 0x28, 0x39, 0x7d, 0xa2, 0x12, 0x89, 0x0a, 0x83, 0x0b, 0x0b,
+ 0x95, 0xa5, 0x99, 0x68, 0xce, 0xf2, 0x34, 0x77, 0x37, 0x79, 0xdf,
+ 0x51, 0x81, 0xcf, 0x10, 0xfa, 0x64, 0x75, 0x34, 0xbb, 0x65}});
+
+ EXPECT_FALSE(IsNonWhitelistedCertificate(*cert, public_key_hashes));
+
+ cert = ImportCertFromFile(GetTestCertsDirectory(), "wosign_after_oct_21.pem");
+ ASSERT_TRUE(cert);
+
+ EXPECT_TRUE(IsNonWhitelistedCertificate(*cert, public_key_hashes));
+}
+
} // namespace
} // namespace net
« no previous file with comments | « net/cert/cert_verify_proc_whitelist.cc ('k') | net/data/ssl/certificates/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698