summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-06 11:28:15 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-06 11:28:17 +0200
commitfc3082f58195fa88a3f5993aed876f84b43021a8 (patch)
treebbfe1519f29795a5da029aa3159e2a4e772eb1e9 /tests
parent066a50a92f75b36385277fec5fffe9a9a44d6ff3 (diff)
downloadgnutls-fc3082f58195fa88a3f5993aed876f84b43021a8.tar.gz
tests: added reproducer for private key crash
Found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2865 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/key-tests/Makefile.am2
-rw-r--r--tests/key-tests/data/key-invalid5.derbin0 -> 24 bytes
-rwxr-xr-xtests/key-tests/key-invalid3
3 files changed, 3 insertions, 2 deletions
diff --git a/tests/key-tests/Makefile.am b/tests/key-tests/Makefile.am
index 5bb5dc7c34..9184233da1 100644
--- a/tests/key-tests/Makefile.am
+++ b/tests/key-tests/Makefile.am
@@ -30,7 +30,7 @@ EXTRA_DIST = data/key-ca.pem data/key-user.pem \
data/dsa.1024.pem data/dsa.2048.pem data/dsa.3072.pem data/dsa-pubkey-1018.pem \
data/bad-key.pem data/p8key-illegal.pem data/key-illegal.pem data/pkcs8-pbes2-sha256.pem \
data/pkcs8-pbes1-des-md5.pem data/pkcs8-invalid8.der data/key-invalid1.der \
- data/key-invalid4.der \
+ data/key-invalid4.der data/key-invalid5.der \
data data/pkcs8-invalid9.der data/key-invalid2.der data/pkcs8-invalid10.der \
data/key-invalid3.der data/pkcs8-eddsa.pem data/pkcs8-eddsa.pem.txt
diff --git a/tests/key-tests/data/key-invalid5.der b/tests/key-tests/data/key-invalid5.der
new file mode 100644
index 0000000000..e03829cb79
--- /dev/null
+++ b/tests/key-tests/data/key-invalid5.der
Binary files differ
diff --git a/tests/key-tests/key-invalid b/tests/key-tests/key-invalid
index 3943e14dfc..b0e6d52c77 100755
--- a/tests/key-tests/key-invalid
+++ b/tests/key-tests/key-invalid
@@ -35,7 +35,8 @@ if ! test -z "${VALGRIND}"; then
fi
ret=0
-for p8 in "key-invalid1.der" "key-invalid2.der" "key-invalid3.der" "key-invalid4.der";do
+for p8 in "key-invalid1.der" "key-invalid2.der" "key-invalid3.der" "key-invalid4.der" \
+"key-invalid5.der";do
set -- ${p8}
file="$1"
${VALGRIND} "${CERTTOOL}" --inder --key-info \