summaryrefslogtreecommitdiff
path: root/tests/cert-tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-11-14 07:45:49 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-11-14 07:45:49 +0100
commit9db6a3d214d59e9031776ab33084e1958b4f01ba (patch)
treef7ffcd7b004899d1405f93c0beeee682e35543c5 /tests/cert-tests
parente9b2aa4fdb7afdb0a35ea82964fcd2a2df6c3641 (diff)
downloadgnutls-9db6a3d214d59e9031776ab33084e1958b4f01ba.tar.gz
corrected crq test case; reported by Andreas Metzler
Diffstat (limited to 'tests/cert-tests')
-rwxr-xr-xtests/cert-tests/crq13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/cert-tests/crq b/tests/cert-tests/crq
index 6deb5a49a6..18c2e2a4b8 100755
--- a/tests/cert-tests/crq
+++ b/tests/cert-tests/crq
@@ -28,14 +28,23 @@ DIFF=${DIFF:-diff}
if ! test -z "${VALGRIND}";then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15"
fi
+OUTFILE=out.tmp
-$VALGRIND $CERTTOOL --inder --crq-info --infile $srcdir/crq-invalid.der >/dev/null 2>&1
+$VALGRIND $CERTTOOL --inder --crq-info --infile $srcdir/csr-invalid.der >$OUTFILE 2>&1
rc=$?
# We're done.
-if test "$rc" != "1"; then
+if test "$rc" != "0"; then
echo "Invalid crq decoding failed"
exit $rc
fi
+grep "error: get_key_id" $OUTFILE >/dev/null 2>&1
+if test "$?" != "0"; then
+ echo "crq decoding didn't fail as expected"
+ exit 1
+fi
+
+rm -f $OUTFILE
+
exit 0