summaryrefslogtreecommitdiff
path: root/tests/cert-tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-03-05 02:21:30 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-03-05 17:53:01 +0100
commit1cd710fbb93564e529fd961483e7609a8a3738f0 (patch)
tree7f1ee2f28dd659d174699eb5e2a1d91582d13737 /tests/cert-tests
parentc922433e8311d0af2e30f77e2992d7dcf963d076 (diff)
downloadgnutls-1cd710fbb93564e529fd961483e7609a8a3738f0.tar.gz
Enforce the max packet length for OpenPGP subpackets as well
This addresses: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=392 Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Diffstat (limited to 'tests/cert-tests')
-rw-r--r--tests/cert-tests/data/openpgp-invalid9.pubbin0 -> 16 bytes
-rwxr-xr-xtests/cert-tests/openpgp-cert-parser3
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/cert-tests/data/openpgp-invalid9.pub b/tests/cert-tests/data/openpgp-invalid9.pub
new file mode 100644
index 0000000000..5fbab2a0b5
--- /dev/null
+++ b/tests/cert-tests/data/openpgp-invalid9.pub
Binary files differ
diff --git a/tests/cert-tests/openpgp-cert-parser b/tests/cert-tests/openpgp-cert-parser
index 7f22271077..4ac5a6f946 100755
--- a/tests/cert-tests/openpgp-cert-parser
+++ b/tests/cert-tests/openpgp-cert-parser
@@ -42,7 +42,8 @@ echo "Checking OpenPGP certificate parsing"
for i in "truncated.pub" "attribute-leak-1.pub" "subpkt-leak.pub" "openpgp-invalid1.pub" \
"openpgp-invalid2.pub" "openpgp-invalid3.pub" "openpgp-invalid4.pub" "openpgp-invalid5.pub" \
- "openpgp-invalid6.pub" "openpgp-invalid7.pub" "openpgp-invalid8.pub";do
+ "openpgp-invalid6.pub" "openpgp-invalid7.pub" "openpgp-invalid8.pub" \
+ "openpgp-invalid9.pub";do
${VALGRIND} "${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/data/${i}"
rc=$?
if test $rc != 1;then