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

Unified Diff: net/cert/internal/path_builder_pkits_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: address moar feedback 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
« no previous file with comments | « net/cert/internal/path_builder.cc ('k') | net/cert/internal/path_builder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/path_builder_pkits_unittest.cc
diff --git a/net/cert/internal/path_builder_pkits_unittest.cc b/net/cert/internal/path_builder_pkits_unittest.cc
index a046d1cfe3029b1ae39374e89d3423c8e96b5e27..86345c7c89c8de58a9f48b3947c04c3fab95aec5 100644
--- a/net/cert/internal/path_builder_pkits_unittest.cc
+++ b/net/cert/internal/path_builder_pkits_unittest.cc
@@ -67,7 +67,10 @@ class PathBuilderPkitsTestDelegate {
// First entry in the PKITS chain is the trust anchor.
// TODO(mattm): test with all possible trust anchors in the trust store?
TrustStore trust_store;
- trust_store.AddTrustedCertificate(certs[0]);
+
+ scoped_refptr<TrustAnchor> trust_anchor =
+ TrustAnchor::CreateFromCertificateNoConstraints(certs[0]);
+ trust_store.AddTrustAnchor(std::move(trust_anchor));
// TODO(mattm): test with other irrelevant certs in cert_issuer_sources?
CertIssuerSourceStatic cert_issuer_source;
« no previous file with comments | « net/cert/internal/path_builder.cc ('k') | net/cert/internal/path_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698