1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-18 00:49:50 +02:00
gnupg/checks/clearsig.test

55 lines
1.6 KiB
Plaintext
Raw Normal View History

1998-02-26 17:56:31 +01:00
#!/bin/sh
# Fixme: we should not only do a --verify but also the output.
1998-09-14 12:33:57 +02:00
. $srcdir/defs.inc || exit 3
1998-02-26 17:56:31 +01:00
1998-07-08 11:29:43 +02:00
# I can't compare the out because plain-3 has no LF as last charcater
# but the output has always one. I do not thinkl this is a bug, because
# it is clear text and not binary text.
1998-02-26 17:56:31 +01:00
for i in $plain_files; do
1998-09-14 17:49:56 +02:00
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 -sat -o x --yes $i
$srcdir/run-gpg --verify x
1998-07-08 11:29:43 +02:00
done
# and once more to check rfc1991
for i in $plain_files; do
1998-09-14 17:49:56 +02:00
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 \
1998-07-08 11:29:43 +02:00
--rfc1991 --digest-algo md5 -sat -o x --yes $i
1998-09-14 17:49:56 +02:00
$srcdir/run-gpg --verify x
1998-02-26 17:56:31 +01:00
done
# and one with long lines
cat >y <<EOF
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
EOF
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
$srcdir/run-gpg --verify x
# and one with only one long lines
cat >y <<EOF
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyx
EOF
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
$srcdir/run-gpg --verify x
# and one with an empty body
cat >y <<EOF
EOF
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
$srcdir/run-gpg --verify x
# and one with one empty line at the end
cat >y <<EOF
line 1
line 2
line 3
there is a blank line after this
EOF
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
$srcdir/run-gpg --verify x
1998-02-26 17:56:31 +01:00