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

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

Issue 2800993002: Add a key purpose parameter to Certificate PathBuilder. (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « net/cert/internal/path_builder.h ('k') | net/cert/internal/path_builder_pkits_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.cc
diff --git a/net/cert/internal/path_builder.cc b/net/cert/internal/path_builder.cc
index 71192b971bd5785021c8ea232f389698606754e1..291bcf5360643b4a7a76bc85273fe430c41cae70 100644
--- a/net/cert/internal/path_builder.cc
+++ b/net/cert/internal/path_builder.cc
@@ -491,10 +491,12 @@ CertPathBuilder::CertPathBuilder(scoped_refptr<ParsedCertificate> cert,
const TrustStore* trust_store,
const SignaturePolicy* signature_policy,
const der::GeneralizedTime& time,
+ KeyPurpose key_purpose,
Result* result)
: cert_path_iter_(new CertPathIter(std::move(cert), trust_store)),
signature_policy_(signature_policy),
time_(time),
+ key_purpose_(key_purpose),
next_state_(STATE_NONE),
out_result_(result) {}
@@ -541,9 +543,9 @@ void CertPathBuilder::DoGetNextPathComplete() {
// Verify the entire certificate chain.
auto result_path = base::MakeUnique<ResultPath>();
- bool verify_result =
- VerifyCertificateChain(next_path_.certs, next_path_.trust_anchor.get(),
- signature_policy_, time_, &result_path->errors);
+ bool verify_result = VerifyCertificateChain(
+ next_path_.certs, next_path_.trust_anchor.get(), signature_policy_, time_,
+ key_purpose_, &result_path->errors);
DVLOG(1) << "CertPathBuilder VerifyCertificateChain result = "
<< verify_result;
result_path->path = next_path_;
« no previous file with comments | « net/cert/internal/path_builder.h ('k') | net/cert/internal/path_builder_pkits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698