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

Unified Diff: net/cert/x509_certificate_unittest.cc

Issue 27624002: Add a histogram for measuring the number of times we fall back to common name matching, when a cert… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 2 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
« no previous file with comments | « net/cert/x509_certificate.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate_unittest.cc
diff --git a/net/cert/x509_certificate_unittest.cc b/net/cert/x509_certificate_unittest.cc
index 04dbaddf69f19b15f0630a2ba68dda0b58fe1eae..83de91a64bca913cbfae5ed3deef2cbe3ab3f410 100644
--- a/net/cert/x509_certificate_unittest.cc
+++ b/net/cert/x509_certificate_unittest.cc
@@ -190,11 +190,12 @@ TEST(X509CertificateTest, WebkitCertParsing) {
EXPECT_EQ("webkit.org", dns_names[1]);
// Test that the wildcard cert matches properly.
- EXPECT_TRUE(webkit_cert->VerifyNameMatch("www.webkit.org"));
- EXPECT_TRUE(webkit_cert->VerifyNameMatch("foo.webkit.org"));
- EXPECT_TRUE(webkit_cert->VerifyNameMatch("webkit.org"));
- EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.webkit.com"));
- EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.foo.webkit.com"));
+ bool unused = false;
+ EXPECT_TRUE(webkit_cert->VerifyNameMatch("www.webkit.org", &unused));
+ EXPECT_TRUE(webkit_cert->VerifyNameMatch("foo.webkit.org", &unused));
+ EXPECT_TRUE(webkit_cert->VerifyNameMatch("webkit.org", &unused));
+ EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.webkit.com", &unused));
+ EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.foo.webkit.com", &unused));
}
TEST(X509CertificateTest, ThawteCertParsing) {
@@ -1139,8 +1140,9 @@ TEST_P(X509CertificateNameVerifyTest, VerifyHostname) {
}
}
+ bool unused = false;
EXPECT_EQ(test_data.expected, X509Certificate::VerifyHostname(
- test_data.hostname, common_name, dns_names, ip_addressses));
+ test_data.hostname, common_name, dns_names, ip_addressses, &unused));
}
INSTANTIATE_TEST_CASE_P(, X509CertificateNameVerifyTest,
« no previous file with comments | « net/cert/x509_certificate.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698