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

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

Issue 2903283002: Add policies support to VerifyCertificateChain(). (Closed)
Patch Set: improve comments, and null policy tree when anyPolicy is incorrectly mapped Created 3 years, 7 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/nist_pkits_unittest.cc ('k') | net/cert/internal/test_helpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/path_builder.cc
diff --git a/net/cert/internal/path_builder.cc b/net/cert/internal/path_builder.cc
index d1ce0bdbe5db7f8e70425ccf4540aac38b8f9575..05b66d66fe7437269a39785f0d69d870a16784e2 100644
--- a/net/cert/internal/path_builder.cc
+++ b/net/cert/internal/path_builder.cc
@@ -604,9 +604,12 @@ void CertPathBuilder::DoGetNextPathComplete() {
// Verify the entire certificate chain.
auto result_path = base::MakeUnique<ResultPath>();
- VerifyCertificateChain(next_path_.certs, next_path_.last_cert_trust,
- signature_policy_, time_, key_purpose_,
- &result_path->errors);
+ // TODO(eroman): don't pass placeholder for policy.
+ VerifyCertificateChain(
+ next_path_.certs, next_path_.last_cert_trust, signature_policy_, time_,
+ key_purpose_, InitialExplicitPolicy::kFalse, {AnyPolicy()},
+ InitialPolicyMappingInhibit::kFalse, InitialAnyPolicyInhibit::kFalse,
+ nullptr /*user_constrained_policy_set*/, &result_path->errors);
bool verify_result = !result_path->errors.ContainsHighSeverityErrors();
DVLOG(1) << "CertPathBuilder VerifyCertificateChain result = "
« no previous file with comments | « net/cert/internal/nist_pkits_unittest.cc ('k') | net/cert/internal/test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698