summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-19 09:14:29 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-19 09:22:57 +0100
commit079153c639b85dc3538e06662b502621fe127595 (patch)
tree8b1d871fe4896f5e5ddde9de0b71fb267a761070
parent5f1b225357a1a3d639a102bab7639ba39bfce47b (diff)
downloadgnutls-079153c639b85dc3538e06662b502621fe127595.tar.gz
tests: added PKCS#8 key which causes undefined behavior on import
Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=389 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--tests/key-tests/Makefile.am2
-rw-r--r--tests/key-tests/data/pkcs8-invalid10.derbin0 -> 36 bytes
-rwxr-xr-xtests/key-tests/pkcs8-invalid2
3 files changed, 2 insertions, 2 deletions
diff --git a/tests/key-tests/Makefile.am b/tests/key-tests/Makefile.am
index a69427365e..3aa4837d16 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 data/pkcs8-invalid9.der data/key-invalid2.der
+ data data/pkcs8-invalid9.der data/key-invalid2.der data/pkcs8-invalid10.der
dist_check_SCRIPTS = key-id pkcs8 pkcs8-decode dsa ecdsa illegal-rsa pkcs8-invalid key-invalid
diff --git a/tests/key-tests/data/pkcs8-invalid10.der b/tests/key-tests/data/pkcs8-invalid10.der
new file mode 100644
index 0000000000..eb9c173eb0
--- /dev/null
+++ b/tests/key-tests/data/pkcs8-invalid10.der
Binary files differ
diff --git a/tests/key-tests/pkcs8-invalid b/tests/key-tests/pkcs8-invalid
index c38059723e..9cd56724b4 100755
--- a/tests/key-tests/pkcs8-invalid
+++ b/tests/key-tests/pkcs8-invalid
@@ -36,7 +36,7 @@ fi
ret=0
for p8 in "pkcs8-invalid1.der 1234" "pkcs8-invalid2.der 1234" "pkcs8-invalid3.der 1234" "pkcs8-invalid4.der 1234" \
"pkcs8-invalid5.der 1234" "pkcs8-invalid6.der 1234" "pkcs8-invalid7.der 1234" "pkcs8-invalid8.der password" \
- "pkcs8-invalid9.der password";do
+ "pkcs8-invalid9.der password" "pkcs8-invalid10.der password";do
set -- ${p8}
file="$1"
passwd="$2"