summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-19 09:24:19 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-19 09:24:19 +0100
commit765681dd78410d7bac098cde3d3adfbffdb6d927 (patch)
tree86ea25ee558980e1fe207e069153da3d8a6b912b
parenta0c10aaf2ae401b4f0e4705d58bb49cff9f92c67 (diff)
downloadgnutls-765681dd78410d7bac098cde3d3adfbffdb6d927.tar.gz
tests: added private key causing FPE
Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=393 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--tests/key-tests/Makefile.am3
-rw-r--r--tests/key-tests/data/key-invalid3.derbin0 -> 70 bytes
-rwxr-xr-xtests/key-tests/key-invalid2
3 files changed, 3 insertions, 2 deletions
diff --git a/tests/key-tests/Makefile.am b/tests/key-tests/Makefile.am
index 3aa4837d16..6764564224 100644
--- a/tests/key-tests/Makefile.am
+++ b/tests/key-tests/Makefile.am
@@ -30,7 +30,8 @@ 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 data/pkcs8-invalid9.der data/key-invalid2.der data/pkcs8-invalid10.der
+ data data/pkcs8-invalid9.der data/key-invalid2.der data/pkcs8-invalid10.der \
+ data/key-invalid3.der
dist_check_SCRIPTS = key-id pkcs8 pkcs8-decode dsa ecdsa illegal-rsa pkcs8-invalid key-invalid
diff --git a/tests/key-tests/data/key-invalid3.der b/tests/key-tests/data/key-invalid3.der
new file mode 100644
index 0000000000..2700ef03c4
--- /dev/null
+++ b/tests/key-tests/data/key-invalid3.der
Binary files differ
diff --git a/tests/key-tests/key-invalid b/tests/key-tests/key-invalid
index 0c36116bf8..874e643a78 100755
--- a/tests/key-tests/key-invalid
+++ b/tests/key-tests/key-invalid
@@ -35,7 +35,7 @@ if ! test -z "${VALGRIND}"; then
fi
ret=0
-for p8 in "key-invalid1.der" "key-invalid2.der";do
+for p8 in "key-invalid1.der" "key-invalid2.der" "key-invalid3.der";do
set -- ${p8}
file="$1"
${VALGRIND} "${CERTTOOL}" --inder --key-info \