summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fuzz/gnutls_x509_parser_fuzzer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fuzz/gnutls_x509_parser_fuzzer.c b/fuzz/gnutls_x509_parser_fuzzer.c
index 9e50d94e1a..87b09c4f71 100644
--- a/fuzz/gnutls_x509_parser_fuzzer.c
+++ b/fuzz/gnutls_x509_parser_fuzzer.c
@@ -43,6 +43,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
assert(ret >= 0);
gnutls_free(out.data);
}
+ gnutls_x509_crt_deinit(crt);
+
+ ret = gnutls_x509_crt_init(&crt);
+ assert(ret >= 0);
+
+ gnutls_x509_crt_set_flags(crt, GNUTLS_X509_CRT_FLAG_IGNORE_SANITY);
+ gnutls_x509_crt_import(crt, &raw, GNUTLS_X509_FMT_DER);
gnutls_x509_crt_deinit(crt);
return 0;