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

Unified Diff: net/cert/cert_policy_enforcer_unittest.cc

Issue 795013003: Certificate Transparency: Remove SSLWatcher's Alpha log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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_policy_enforcer.cc ('k') | net/cert/ct_known_logs_static.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_policy_enforcer_unittest.cc
diff --git a/net/cert/cert_policy_enforcer_unittest.cc b/net/cert/cert_policy_enforcer_unittest.cc
index 45a2e6af87cc1999ceaa439c368f3650d0dbd3f7..de840c6e2daba8dc851ad7c9a486d44484a0c819 100644
--- a/net/cert/cert_policy_enforcer_unittest.cc
+++ b/net/cert/cert_policy_enforcer_unittest.cc
@@ -44,7 +44,7 @@ class DummyEVCertsWhitelist : public ct::EVCertsWhitelist {
class CertPolicyEnforcerTest : public ::testing::Test {
public:
virtual void SetUp() override {
- policy_enforcer_.reset(new CertPolicyEnforcer(5, true));
+ policy_enforcer_.reset(new CertPolicyEnforcer(true));
std::string der_test_cert(ct::GetDerEncodedX509Cert());
chain_ = X509Certificate::CreateFromBytes(der_test_cert.data(),
@@ -109,7 +109,7 @@ TEST_F(CertPolicyEnforcerTest, DoesNotConformToCTEVPolicyNotEnoughSCTs) {
}
TEST_F(CertPolicyEnforcerTest, DoesNotEnforceCTPolicyIfNotRequired) {
- scoped_ptr<CertPolicyEnforcer> enforcer(new CertPolicyEnforcer(3, false));
+ scoped_ptr<CertPolicyEnforcer> enforcer(new CertPolicyEnforcer(false));
ct::CTVerifyResult result;
FillResultWithSCTsOfOrigin(ct::SignedCertificateTimestamp::SCT_EMBEDDED, 1,
@@ -164,19 +164,6 @@ TEST_F(CertPolicyEnforcerTest,
}
}
-TEST_F(CertPolicyEnforcerTest,
- ConformsToPolicyButDoesNotRequireMoreThanNumLogs) {
- scoped_ptr<CertPolicyEnforcer> enforcer(new CertPolicyEnforcer(2, true));
-
- ct::CTVerifyResult result;
- FillResultWithSCTsOfOrigin(ct::SignedCertificateTimestamp::SCT_EMBEDDED, 2,
- &result);
- // Expect true despite the chain not having enough SCTs according to the
- // policy
- // since we only have 2 logs.
- EXPECT_TRUE(enforcer->DoesConformToCTEVPolicy(chain_.get(), nullptr, result));
-}
-
TEST_F(CertPolicyEnforcerTest, ConformsToPolicyByEVWhitelistPresence) {
scoped_refptr<ct::EVCertsWhitelist> whitelist(
new DummyEVCertsWhitelist(true, true));
« no previous file with comments | « net/cert/cert_policy_enforcer.cc ('k') | net/cert/ct_known_logs_static.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698