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

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

Issue 2327973002: Add CertErrors* parameter to the main Certificate parsing functions. (Closed)
Patch Set: fix comment typeo 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
Index: net/cert/internal/cert_issuer_source_aia.cc
diff --git a/net/cert/internal/cert_issuer_source_aia.cc b/net/cert/internal/cert_issuer_source_aia.cc
index 5ee96a07831110187e2023ff02fe5219e69ce6e1..a6fb1b703d11bd5f8bc11598c2cf8c2fe6d3f371 100644
--- a/net/cert/internal/cert_issuer_source_aia.cc
+++ b/net/cert/internal/cert_issuer_source_aia.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "net/cert/cert_net_fetcher.h"
+#include "net/cert/internal/cert_errors.h"
#include "url/gurl.h"
namespace net {
@@ -86,11 +87,13 @@ void AiaRequest::OnFetchCompleted(Error error,
// TODO(mattm): Avoid copying bytes. Change the CertNetFetcher and
// ParsedCertificate interface to allow passing through ownership of the
// bytes.
- if (!ParsedCertificate::CreateAndAddToVector(
- fetched_bytes.data(), fetched_bytes.size(),
- ParsedCertificate::DataSource::INTERNAL_COPY, {}, &results_)) {
- // TODO(mattm): propagate error info.
- LOG(ERROR) << "Error parsing AIA data";
+ CertErrors errors;
+ if (!ParsedCertificate::CreateAndAddToVector(fetched_bytes.data(),
+ fetched_bytes.size(), {},
+ &results_, &errors)) {
+ // TODO(crbug.com/634443): propagate error info.
+ LOG(ERROR) << "Error parsing cert retrieved from AIA:\n"
+ << errors.ToDebugString();
}
}
// If the client is waiting for results, need to run callback if:

Powered by Google App Engine
This is Rietveld 408576698