From 9f13d4dd5ec420fb2fa0a7b94a6d66bb2700a492 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 22 Apr 2016 18:44:23 +0100 Subject: [PATCH] add test for CVE-2016-2109 Reviewed-by: Richard Levitte --- test/d2i-tests/bad_bio.der | Bin 0 -> 7 bytes test/recipes/25-test_d2i.t | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 test/d2i-tests/bad_bio.der diff --git a/test/d2i-tests/bad_bio.der b/test/d2i-tests/bad_bio.der new file mode 100644 index 0000000000000000000000000000000000000000..8681f0528d9747a7d88b0f04a7c22759f3d4d3f0 GIT binary patch literal 7 McmXqLNnij100vJ16#xJL literal 0 HcmV?d00001 diff --git a/test/recipes/25-test_d2i.t b/test/recipes/25-test_d2i.t index 111fa5b100..9e1a643aaf 100644 --- a/test/recipes/25-test_d2i.t +++ b/test/recipes/25-test_d2i.t @@ -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"); -- 2.25.1