aboutsummaryrefslogtreecommitdiffstats
path: root/checks/clearsig.test
diff options
context:
space:
mode:
Diffstat (limited to 'checks/clearsig.test')
-rwxr-xr-xchecks/clearsig.test52
1 files changed, 36 insertions, 16 deletions
diff --git a/checks/clearsig.test b/checks/clearsig.test
index f77fd5db0..89d323317 100755
--- a/checks/clearsig.test
+++ b/checks/clearsig.test
@@ -14,17 +14,17 @@
# it is clear text and not binary text.
# ======================================
for i in $plain_files plain-large ; do
- echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 -sat -o x --yes $i
- $srcdir/run-gpg --verify x
+ echo "$usrpass1" | $GPG --passphrase-fd 0 -sat -o x --yes $i
+ $GPG --verify x
done
# ======================================
# and once more to check rfc1991
# ======================================
for i in $plain_files plain-large ; do
- echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 \
+ echo "$usrpass1" | $GPG --passphrase-fd 0 \
--rfc1991 --digest-algo md5 -sat -o x --yes $i
- $srcdir/run-gpg --verify x
+ $GPG --verify x
done
# ======================================
@@ -35,8 +35,8 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
EOF
-echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
-$srcdir/run-gpg --verify x
+echo "$usrpass1" | $GPG --passphrase-fd 0 --clearsign -o x --yes y
+$GPG --verify x
# ======================================
# and one with only one long lines
@@ -44,14 +44,15 @@ $srcdir/run-gpg --verify x
cat >y <<EOF
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyx
EOF
-echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
-$srcdir/run-gpg --verify x
+echo "$usrpass1" | $GPG --passphrase-fd 0 --clearsign -o x --yes y
+$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
+echo "$usrpass1" | $GPG --passphrase-fd 0 --clearsign -o x --yes y
+$GPG --verify x
# ======================================
# and one with one empty line at the end
@@ -63,20 +64,39 @@ 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
+echo "$usrpass1" | $GPG --passphrase-fd 0 --clearsign -o x --yes y
+$GPG --verify x
# ======================================
-# I think this file will be contructed wrong (gpg 0.9.3)
+# I think this file will be constructed 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
echo_n " " >>y
-echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y
-$srcdir/run-gpg --verify x
+echo "$usrpass1" | $GPG --passphrase-fd 0 --clearsign -o x --yes y
+$GPG --verify x
+
+# ======================================
+# check our special diff mode
+# ======================================
+cat >y <<EOF
+--- mainproc.c Tue Jun 27 09:28:11 2000
++++ mainproc.c~ Thu Jun 8 22:50:25 2000
+@@ -1190,16 +1190,13 @@
+ md_enable( c->mfx.md, n1->pkt->pkt.signature->digest_algo);
+ }
+ /* ask for file and hash it */
+- if( c->sigs_only ) {
++ if( c->sigs_only )
+ rc = hash_datafiles( c->mfx.md, NULL,
+ c->signed_data, c->sigfilename,
+ n1? (n1->pkt->pkt.onepass_sig->sig_class == 0x01):0 );
+EOF
+echo "$usrpass1" | $GPG --passphrase-fd 0 \
+ --not-dash-escaped --clearsign -o x --yes y
+$GPG --verify x