From 6038ac5ce113d54589c18a8c8d3fa35dd285dc8d Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 25 Aug 2021 11:13:17 -0400 Subject: [PATCH] Run X509_print in the certificate fuzzer. Given the error handling issues in the previous CL, we'll probably be chasing down bugs in there for a while. Change-Id: I7a219e0fe2496f602d38b4bd0fcd5585ebd72cb7 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/49046 Reviewed-by: Adam Langley --- fuzz/cert.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fuzz/cert.cc b/fuzz/cert.cc index 0bfcac4cb..79e145614 100644 --- a/fuzz/cert.cc +++ b/fuzz/cert.cc @@ -26,6 +26,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) { uint8_t *der = NULL; i2d_X509(x509, &der); OPENSSL_free(der); + + BIO *bio = BIO_new(BIO_s_mem()); + X509_print(bio, x509); + BIO_free(bio); } X509_free(x509); ERR_clear_error();