summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-04 09:18:03 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-04 11:18:41 +0100
commit78b99fbcc9881c7c34bdac237301c635bd85d681 (patch)
tree7133f75cf763b3834db592817aa8479de9fd5967 /tests
parentf449ce8ea94ef2fc6d26547946dc7189feeea9cd (diff)
downloadgnutls-78b99fbcc9881c7c34bdac237301c635bd85d681.tar.gz
tests: added test with private key that causes memory leak
Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=371 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/key-tests/Makefile.am2
-rw-r--r--tests/key-tests/data/key-invalid2.derbin0 -> 335 bytes
-rwxr-xr-xtests/key-tests/key-invalid2
3 files changed, 2 insertions, 2 deletions
diff --git a/tests/key-tests/Makefile.am b/tests/key-tests/Makefile.am
index 969871b6d2..d63ca78b93 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 data/pkcs8-invalid9.der data/key-invalid2.der
dist_check_SCRIPTS = key-id pkcs8 pkcs8-decode dsa ecdsa illegal-rsa pkcs8-invalid
diff --git a/tests/key-tests/data/key-invalid2.der b/tests/key-tests/data/key-invalid2.der
new file mode 100644
index 0000000000..c4e90e2f7c
--- /dev/null
+++ b/tests/key-tests/data/key-invalid2.der
Binary files differ
diff --git a/tests/key-tests/key-invalid b/tests/key-tests/key-invalid
index 29d7f942b8..0c36116bf8 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";do
+for p8 in "key-invalid1.der" "key-invalid2.der";do
set -- ${p8}
file="$1"
${VALGRIND} "${CERTTOOL}" --inder --key-info \