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

Unified Diff: components/cast_certificate/cast_crl.cc

Issue 2292333002: Add errors per ResultPath for CertPathBuilder. (Closed)
Patch Set: remove error for null trust anchor Created 4 years, 3 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 | « components/cast_certificate/cast_cert_validator.cc ('k') | net/cert/internal/path_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_certificate/cast_crl.cc
diff --git a/components/cast_certificate/cast_crl.cc b/components/cast_certificate/cast_crl.cc
index 1fd52eb0300ff14932c33189dce88f93303268e1..d4402ea53bbfda9142f978fcef3255b82eba22e2 100644
--- a/components/cast_certificate/cast_crl.cc
+++ b/components/cast_certificate/cast_crl.cc
@@ -145,9 +145,9 @@ bool VerifyCRL(const Crl& crl,
&result);
net::CompletionStatus rv = path_builder.Run(base::Closure());
DCHECK_EQ(rv, net::CompletionStatus::SYNC);
- if (!result.is_success() || result.paths.empty() ||
- !result.paths[result.best_result_index]->is_success()) {
+ if (!result.HasValidPath()) {
VLOG(2) << "CRL - Issuer certificate verification failed.";
+ // TODO(crbug.com/634443): Log the error information.
return false;
}
// There are no requirements placed on the leaf certificate having any
@@ -174,7 +174,7 @@ bool VerifyCRL(const Crl& crl,
// "expiration" of the trust anchor is handled instead by its
// presence in the trust store.
*overall_not_after = not_after;
- for (const auto& cert : result.paths[result.best_result_index]->path.certs) {
+ for (const auto& cert : result.GetBestValidPath()->path.certs) {
net::der::GeneralizedTime cert_not_after = cert->tbs().validity_not_after;
if (cert_not_after < *overall_not_after)
*overall_not_after = cert_not_after;
« no previous file with comments | « components/cast_certificate/cast_cert_validator.cc ('k') | net/cert/internal/path_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698