1998-02-26 16:56:31 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
1998-12-09 12:44:46 +00:00
|
|
|
|
|
|
|
# Fixme: we should not only do a --verify but also the output.
|
|
|
|
|
|
|
|
|
|
|
|
|
1998-09-14 10:33:57 +00:00
|
|
|
. $srcdir/defs.inc || exit 3
|
1998-02-26 16:56:31 +00:00
|
|
|
|
1999-02-19 14:54:00 +00:00
|
|
|
|
|
|
|
# ======================================
|
1998-07-08 09:29:43 +00: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.
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
|
|
|
for i in $plain_files plain-large ; do
|
1998-09-14 15:49:56 +00:00
|
|
|
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 -sat -o x --yes $i
|
|
|
|
$srcdir/run-gpg --verify x
|
1998-07-08 09:29:43 +00:00
|
|
|
done
|
1999-02-19 14:54:00 +00:00
|
|
|
|
|
|
|
# ======================================
|
1998-07-08 09:29:43 +00:00
|
|
|
# and once more to check rfc1991
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
|
|
|
for i in $plain_files plain-large ; do
|
1998-09-14 15:49:56 +00:00
|
|
|
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 \
|
1998-07-08 09:29:43 +00:00
|
|
|
--rfc1991 --digest-algo md5 -sat -o x --yes $i
|
1998-09-14 15:49:56 +00:00
|
|
|
$srcdir/run-gpg --verify x
|
1998-02-26 16:56:31 +00:00
|
|
|
done
|
1999-02-19 14:54:00 +00:00
|
|
|
|
|
|
|
# ======================================
|
1998-11-27 14:33:31 +00:00
|
|
|
# and one with long lines
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
1998-11-27 14:33:31 +00:00
|
|
|
cat >y <<EOF
|
|
|
|
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyx
|
|
|
|
|
|
|
|
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
EOF
|
|
|
|
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
|
|
|
|
$srcdir/run-gpg --verify x
|
1999-02-19 14:54:00 +00:00
|
|
|
|
|
|
|
# ======================================
|
1998-11-27 14:33:31 +00:00
|
|
|
# and one with only one long lines
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
1998-11-27 14:33:31 +00:00
|
|
|
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
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
1998-11-27 14:33:31 +00:00
|
|
|
cat >y <<EOF
|
|
|
|
EOF
|
|
|
|
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
|
|
|
|
$srcdir/run-gpg --verify x
|
|
|
|
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
1998-12-09 12:44:46 +00:00
|
|
|
# and one with one empty line at the end
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
1998-12-09 12:44:46 +00:00
|
|
|
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 16:56:31 +00:00
|
|
|
|
1999-02-19 14:54:00 +00:00
|
|
|
# ======================================
|
|
|
|
# I think this file will be contructed wrong (gpg 0.9.3)
|
|
|
|
# but it should verify okay anyway.
|
|
|
|
# bash's builtin echo needs the option -e so we use the external one.
|
|
|
|
# ======================================
|
|
|
|
echo "this is a sig test" >y
|
|
|
|
/bin/echo " \c" >>y
|
|
|
|
echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
|
|
|
|
$srcdir/run-gpg --verify x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|