]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Test that X509_issuer_and_serial_hash doesn't crash
authorMatt Caswell <matt@openssl.org>
Wed, 10 Feb 2021 16:36:57 +0000 (16:36 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 16 Feb 2021 11:32:32 +0000 (11:32 +0000)
Provide a certificate with a bad issuer and check that
X509_issuer_and_serial_hash doesn't crash.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
fuzz/corpora/x509/f5ded9e25448f6f47349d012eda2eb4fccbc7c76 [new file with mode: 0644]
fuzz/x509.c

diff --git a/fuzz/corpora/x509/f5ded9e25448f6f47349d012eda2eb4fccbc7c76 b/fuzz/corpora/x509/f5ded9e25448f6f47349d012eda2eb4fccbc7c76
new file mode 100644 (file)
index 0000000..439c50b
Binary files /dev/null and b/fuzz/corpora/x509/f5ded9e25448f6f47349d012eda2eb4fccbc7c76 differ
index 858ad61bbfa754cee2dc6260a7f8932689e41b17..bf2dfb826d3d5a85f08c1bec3329fae87da4fa75 100644 (file)
@@ -37,6 +37,8 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
         X509_print(bio, x509);
         BIO_free(bio);
 
+        X509_issuer_and_serial_hash(x509);
+
         i2d_X509(x509, &der);
         OPENSSL_free(der);