add test for CVE-2016-2109
authorDr. Stephen Henson <steve@openssl.org>
Fri, 22 Apr 2016 17:44:23 +0000 (18:44 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 22 Apr 2016 23:29:04 +0000 (00:29 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
test/d2i-tests/bad_bio.der [new file with mode: 0644]
test/recipes/25-test_d2i.t

diff --git a/test/d2i-tests/bad_bio.der b/test/d2i-tests/bad_bio.der
new file mode 100644 (file)
index 0000000..8681f05
Binary files /dev/null and b/test/d2i-tests/bad_bio.der differ
index 111fa5b100e4f45e3af0c909d8a9ed847a954573..9e1a643aaf797093ed633d5cb436fc774478148e 100644 (file)
@@ -15,7 +15,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
 
 setup("test_d2i");
 
-plan tests => 2;
+plan tests => 3;
 
 ok(run(test(["d2i_test", "X509", "decode",
              srctop_file('test','d2i-tests','bad_cert.der')])),
@@ -24,3 +24,7 @@ ok(run(test(["d2i_test", "X509", "decode",
 ok(run(test(["d2i_test", "GENERAL_NAME", "decode",
              srctop_file('test','d2i-tests','bad_generalname.der')])),
    "Running d2i_test bad_generalname.der");
+
+ok(run(test(["d2i_test", "ASN1_ANY", "BIO",
+             srctop_file('test','d2i-tests','bad_bio.der')])),
+   "Running d2i_test bad_bio.der");