summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2020-01-09 06:50:24 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2020-01-09 06:50:24 +0000
commit68d111e358061623bcc225303fe991324b135062 (patch)
tree5104de4a98f291327f2d2b2ad7388ed619805145 /fuzz
parent14794f5707c2414f9dcb64a629948fba7753510a (diff)
parentdad163998fb38a27197b43bdd3e805f4a6817251 (diff)
downloadgnutls-68d111e358061623bcc225303fe991324b135062.tar.gz
Merge branch 'tmp-check-dup-extensions' into 'master'
x509: reject certificates having duplicate extensions Closes #887 See merge request gnutls/gnutls!1145
Diffstat (limited to 'fuzz')
-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;