diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-11-14 07:45:49 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-11-14 07:45:49 +0100 |
commit | 9db6a3d214d59e9031776ab33084e1958b4f01ba (patch) | |
tree | f7ffcd7b004899d1405f93c0beeee682e35543c5 /tests/cert-tests | |
parent | e9b2aa4fdb7afdb0a35ea82964fcd2a2df6c3641 (diff) | |
download | gnutls-9db6a3d214d59e9031776ab33084e1958b4f01ba.tar.gz |
corrected crq test case; reported by Andreas Metzler
Diffstat (limited to 'tests/cert-tests')
-rwxr-xr-x | tests/cert-tests/crq | 13 |
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 |