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

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

Issue 2327973002: Add CertErrors* parameter to the main Certificate parsing functions. (Closed)
Patch Set: StringPiece is kind of dangerous... 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.cc ('k') | net/cert/internal/parse_certificate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/parse_certificate_fuzzer.cc
diff --git a/net/cert/internal/parse_certificate_fuzzer.cc b/net/cert/internal/parse_certificate_fuzzer.cc
index 5efcd6fc20e66fbcb2dc66de819920d2276ba748..956bc3e69090756a06079db4ee832befb5c61ce2 100644
--- a/net/cert/internal/parse_certificate_fuzzer.cc
+++ b/net/cert/internal/parse_certificate_fuzzer.cc
@@ -6,6 +6,7 @@
#include <stdint.h>
#include "base/macros.h"
+#include "net/cert/internal/cert_errors.h"
#include "net/cert/internal/certificate_policies.h"
#include "net/cert/internal/extended_key_usage.h"
#include "net/cert/internal/name_constraints.h"
@@ -32,8 +33,9 @@ void ParseCertificateForFuzzer(const der::Input& in) {
der::Input tbs_certificate_tlv;
der::Input signature_algorithm_tlv;
der::BitString signature_value;
+ CertErrors errors;
if (!ParseCertificate(in, &tbs_certificate_tlv, &signature_algorithm_tlv,
- &signature_value))
+ &signature_value, &errors))
return;
std::unique_ptr<SignatureAlgorithm> sig_alg(
SignatureAlgorithm::CreateFromDer(signature_algorithm_tlv));
« no previous file with comments | « net/cert/internal/parse_certificate.cc ('k') | net/cert/internal/parse_certificate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698