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

Unified Diff: components/cast_certificate/cast_crl_unittest.cc

Issue 2225493003: Don't treat trust anchors as certificates during path building. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix components_unittests compile (hopefully) Created 4 years, 4 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: components/cast_certificate/cast_crl_unittest.cc
diff --git a/components/cast_certificate/cast_crl_unittest.cc b/components/cast_certificate/cast_crl_unittest.cc
index 5698dbe4c6a80510e67ac813fa7c87500439ed00..579d67538d199293256d72d09fa1a6a095345e7b 100644
--- a/components/cast_certificate/cast_crl_unittest.cc
+++ b/components/cast_certificate/cast_crl_unittest.cc
@@ -20,10 +20,12 @@ std::unique_ptr<net::TrustStore> CreateTrustStoreFromFile(
const auto trusted_test_roots =
cast_certificate::testing::ReadCertificateChainFromFile(path);
for (const auto& trusted_root : trusted_test_roots) {
- scoped_refptr<net::ParsedCertificate> anchor(
+ scoped_refptr<net::ParsedCertificate> cert(
net::ParsedCertificate::CreateFromCertificateCopy(trusted_root, {}));
- EXPECT_TRUE(anchor);
- trust_store->AddTrustedCertificate(std::move(anchor));
+ EXPECT_TRUE(cert);
+ auto anchor =
+ net::TrustAnchor::CreateFromCertificateNoConstraints(std::move(cert));
+ trust_store->AddTrustAnchor(std::move(anchor));
}
return trust_store;
}

Powered by Google App Engine
This is Rietveld 408576698