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

Unified Diff: net/cert/internal/parse_certificate.h

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 | « no previous file | net/cert/internal/parse_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/parse_certificate.h
diff --git a/net/cert/internal/parse_certificate.h b/net/cert/internal/parse_certificate.h
index 2277a4e8efc05b7b9418be37ae2a116154987c42..9049246aa781a67f3920eb64815b7890a1672e17 100644
--- a/net/cert/internal/parse_certificate.h
+++ b/net/cert/internal/parse_certificate.h
@@ -102,6 +102,9 @@ NET_EXPORT bool ParseCertificate(const der::Input& certificate_tlv,
// on success and sets the results in |out|. Certain invalid inputs may
// be accepted based on the provided |options|.
//
+// If |errors| was non-null then any warnings/errors that occur during parsing
+// are added to it.
+//
// Note that on success |out| aliases data from the input |tbs_tlv|.
// Hence the fields of the ParsedTbsCertificate are only valid as long as
// |tbs_tlv| remains valid.
@@ -129,8 +132,8 @@ NET_EXPORT bool ParseCertificate(const der::Input& certificate_tlv,
// }
NET_EXPORT bool ParseTbsCertificate(const der::Input& tbs_tlv,
const ParseCertificateOptions& options,
- ParsedTbsCertificate* out)
- WARN_UNUSED_RESULT;
+ ParsedTbsCertificate* out,
+ CertErrors* errors) WARN_UNUSED_RESULT;
// Represents a "Version" from RFC 5280:
// Version ::= INTEGER { v1(0), v2(1), v3(2) }
« no previous file with comments | « no previous file | net/cert/internal/parse_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698