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

Unified Diff: net/cert/internal/verify_certificate_chain_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
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 33a11562ad1be4593e1c78cfd488b937bb564ea2..fb63db17f63239e8f8a413f3abd3cea8c192f23d 100644
--- a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
+++ b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
@@ -66,16 +66,17 @@ class VerifyCertificateChainPkitsTestDelegate {
}
}
- TrustStore trust_store;
- trust_store.AddTrustedCertificate(input_chain.back());
+ scoped_refptr<TrustAnchor> trust_anchor =
+ TrustAnchor::CreateFromCertificateNoConstraints(input_chain.back());
+ input_chain.pop_back();
SimpleSignaturePolicy signature_policy(1024);
// Run all tests at the time the PKITS was published.
der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0};
- return VerifyCertificateChainAssumingTrustedRoot(input_chain, trust_store,
- &signature_policy, time);
+ return VerifyCertificateChain(input_chain, trust_anchor.get(),
+ &signature_policy, time);
}
};
« no previous file with comments | « net/cert/internal/verify_certificate_chain.cc ('k') | net/cert/internal/verify_certificate_chain_typed_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698