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

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

Issue 2341943002: Add error details to TBSCertificate parsing function and tests. (Closed)
Patch Set: fix fuzzer compile 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 | « net/cert/internal/parse_certificate_unittest.cc ('k') | net/cert/internal/parsed_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/parse_ocsp.cc
diff --git a/net/cert/internal/parse_ocsp.cc b/net/cert/internal/parse_ocsp.cc
index 3153b33008d8ea32aed02ae4bdf3e0c7dbcf429f..957677662ec8b2a804cc0f5b3c7c9133f927f459 100644
--- a/net/cert/internal/parse_ocsp.cc
+++ b/net/cert/internal/parse_ocsp.cc
@@ -6,6 +6,7 @@
#include "base/sha1.h"
#include "crypto/sha2.h"
+#include "net/cert/internal/cert_errors.h"
#include "net/cert/internal/parse_ocsp.h"
#include "net/der/encode_values.h"
@@ -500,10 +501,13 @@ bool GetOCSPCertStatus(const OCSPResponseData& response_data,
out->status = OCSPRevocationStatus::GOOD;
ParsedTbsCertificate tbs_cert;
- if (!ParseTbsCertificate(cert_tbs_certificate_tlv, {}, &tbs_cert))
+ // TODO(crbug.com/634443): Propagate the errors.
+ CertErrors errors;
+ if (!ParseTbsCertificate(cert_tbs_certificate_tlv, {}, &tbs_cert, &errors))
return false;
ParsedTbsCertificate issuer_tbs_cert;
- if (!ParseTbsCertificate(issuer_tbs_certificate_tlv, {}, &issuer_tbs_cert))
+ if (!ParseTbsCertificate(issuer_tbs_certificate_tlv, {}, &issuer_tbs_cert,
+ &errors))
return false;
bool found = false;
« no previous file with comments | « net/cert/internal/parse_certificate_unittest.cc ('k') | net/cert/internal/parsed_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698