summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-01-01 09:15:09 -0500
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-01-02 10:17:34 +0100
commit30269ee0dbedc680341819014e8a9629b2c32ca3 (patch)
tree79a17323a7a491cfedbfc8b3a1c9b4406077e730 /tests
parent360a2c0ccc2821874606eb2e2fe41bb8a9b605f8 (diff)
downloadgnutls-30269ee0dbedc680341819014e8a9629b2c32ca3.tar.gz
Corrected a leak in OpenPGP sub-packet parsing.
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/cert-tests/data/subpkt-leak.pub1
-rwxr-xr-xtests/cert-tests/openpgp-cert-parser4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/cert-tests/data/subpkt-leak.pub b/tests/cert-tests/data/subpkt-leak.pub
new file mode 100644
index 0000000000..643c334332
--- /dev/null
+++ b/tests/cert-tests/data/subpkt-leak.pub
@@ -0,0 +1 @@
+Éûÿ‰Š²»ŠŠŠ \ No newline at end of file
diff --git a/tests/cert-tests/openpgp-cert-parser b/tests/cert-tests/openpgp-cert-parser
index c12e1be8d6..2cd843cc66 100755
--- a/tests/cert-tests/openpgp-cert-parser
+++ b/tests/cert-tests/openpgp-cert-parser
@@ -42,4 +42,8 @@ echo "Checking OpenPGP certificate parsing"
| grep "^import error:" > /dev/null) || \
fail "Parsing should have errored"
+("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/data/subpkt-leak.pub" 2>&1 \
+ | grep "^import error:" > /dev/null) || \
+ fail "Parsing should have errored"
+
exit ${RETCODE:-0}