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

Unified Diff: net/cert/internal/verify_certificate_chain_pkits_unittest.cc

Issue 1923433002: Certificate path builder for new certificate verification library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip: Make CertPathIter build the full path including the trust anchor Created 4 years, 8 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/cert/internal/verify_certificate_chain_pkits_unittest.cc
diff --git a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
index 606563708ae98da1df7bc8e0412616eb28a0d9df..0c1a25fddedf070198c8d57f6d18d06573aac9ad 100644
--- a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
+++ b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
@@ -53,7 +53,11 @@ class VerifyCertificateChainPkitsTestDelegate {
}
// First entry in the PKITS chain is the trust anchor.
TrustStore trust_store;
- EXPECT_TRUE(trust_store.AddTrustedCertificate(cert_ders[0]));
+ scoped_refptr<CertThing> anchor(
+ CertThing::CreateFromCertificateCopy(cert_ders[0]));
+ EXPECT_TRUE(anchor);
+ if (anchor)
+ trust_store.AddTrustedCertificate(std::move(anchor));
// PKITS lists chains from trust anchor to target, VerifyCertificateChain
// takes them starting with the target and not including the trust anchor.

Powered by Google App Engine
This is Rietveld 408576698