summaryrefslogtreecommitdiffstats
path: root/tests/openpgp
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-10-25 11:06:21 +0200
committerWerner Koch <wk@gnupg.org>2007-10-25 11:06:21 +0200
commitcd2d9288aaf9c584673675826ba76e7dbc2ad239 (patch)
tree900265d44d0cbc9beb573867fa17148007f37d5f /tests/openpgp
parentAdd a /while loop. (diff)
downloadgnupg2-cd2d9288aaf9c584673675826ba76e7dbc2ad239.tar.xz
gnupg2-cd2d9288aaf9c584673675826ba76e7dbc2ad239.zip
Ported changes from 1.4.
Add copyright notices.
Diffstat (limited to 'tests/openpgp')
-rw-r--r--tests/openpgp/ChangeLog21
-rwxr-xr-xtests/openpgp/armdetach.test8
-rwxr-xr-xtests/openpgp/armdetachm.test8
-rwxr-xr-xtests/openpgp/armencrypt.test8
-rwxr-xr-xtests/openpgp/armencryptp.test8
-rwxr-xr-xtests/openpgp/armor.test7
-rwxr-xr-xtests/openpgp/armsignencrypt.test8
-rwxr-xr-xtests/openpgp/armsigs.test8
-rwxr-xr-xtests/openpgp/clearsig.test8
-rwxr-xr-xtests/openpgp/conventional-mdc.test36
-rwxr-xr-xtests/openpgp/conventional.test34
-rwxr-xr-xtests/openpgp/decrypt-dsa.test8
-rwxr-xr-xtests/openpgp/decrypt.test8
-rwxr-xr-xtests/openpgp/defs.inc19
-rwxr-xr-xtests/openpgp/detach.test8
-rwxr-xr-xtests/openpgp/detachm.test8
-rwxr-xr-xtests/openpgp/encrypt-dsa.test34
-rwxr-xr-xtests/openpgp/encrypt.test34
-rwxr-xr-xtests/openpgp/encryptp.test8
-rwxr-xr-xtests/openpgp/genkey1024.test8
-rwxr-xr-xtests/openpgp/mds.test8
-rwxr-xr-xtests/openpgp/multisig.test9
-rwxr-xr-xtests/openpgp/seat.test8
-rwxr-xr-xtests/openpgp/signencrypt-dsa.test8
-rwxr-xr-xtests/openpgp/signencrypt.test8
-rwxr-xr-xtests/openpgp/sigs-dsa.test8
-rwxr-xr-xtests/openpgp/sigs.test63
-rwxr-xr-xtests/openpgp/verify.test8
-rwxr-xr-xtests/openpgp/version.test8
29 files changed, 286 insertions, 131 deletions
diff --git a/tests/openpgp/ChangeLog b/tests/openpgp/ChangeLog
index 58b95cfb0..9e3b96a85 100644
--- a/tests/openpgp/ChangeLog
+++ b/tests/openpgp/ChangeLog
@@ -1,3 +1,22 @@
+2007-10-25 Werner Koch <wk@g10code.com>
+
+ Add missing copyright notices to *.test.
+
+2007-10-25 David Shaw <dshaw@jabberwocky.com> (wk)
+
+ From 1.4 (July):
+
+ * defs.inc (all_cipher_algos): New function to return all ciphers.
+ * defs.inc (all_cipher_algos): New function to return all ciphers
+ we support. This is safer than the previous setup which could
+ hide that some ciphers weren't being tested. Plus, this
+ automatically tests any new ciphers libgcrypt supports.
+ (all_hash_algos): New.
+ * sigs.test: Use it here, and also test with >=160 bit hashes for
+ DSA2.
+ * conventional.test, encrypt.test, encrypt-dsa.test,
+ * conventional-mdc.test: Use it here.
+
2007-05-02 David Shaw <dshaw@jabberwocky.com>
* conventional.test, encrypt.test, encrypt-dsa.test,
@@ -289,7 +308,7 @@ Mon May 18 15:40:02 1998 Werner Koch (wk@isil.d.shuttle.de)
* ChangeLog: New.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
diff --git a/tests/openpgp/armdetach.test b/tests/openpgp/armdetach.test
index c445d6ce6..e4bbb1fd0 100755
--- a/tests/openpgp/armdetach.test
+++ b/tests/openpgp/armdetach.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/armdetachm.test b/tests/openpgp/armdetachm.test
index f1958424c..67d96287a 100755
--- a/tests/openpgp/armdetachm.test
+++ b/tests/openpgp/armdetachm.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/armencrypt.test b/tests/openpgp/armencrypt.test
index 356d1bda7..df3729410 100755
--- a/tests/openpgp/armencrypt.test
+++ b/tests/openpgp/armencrypt.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/armencryptp.test b/tests/openpgp/armencryptp.test
index d18c56b7e..9246b6d27 100755
--- a/tests/openpgp/armencryptp.test
+++ b/tests/openpgp/armencryptp.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/armor.test b/tests/openpgp/armor.test
index 2efcf3260..eb0267a6f 100755
--- a/tests/openpgp/armor.test
+++ b/tests/openpgp/armor.test
@@ -1,5 +1,12 @@
#!/bin/sh
# Regression tests pertaining to the armoring.
+# Copyright 2006, 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/armsignencrypt.test b/tests/openpgp/armsignencrypt.test
index 24b9575ad..5b392df27 100755
--- a/tests/openpgp/armsignencrypt.test
+++ b/tests/openpgp/armsignencrypt.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/armsigs.test b/tests/openpgp/armsigs.test
index aecc06429..8fc867226 100755
--- a/tests/openpgp/armsigs.test
+++ b/tests/openpgp/armsigs.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/clearsig.test b/tests/openpgp/clearsig.test
index 8217f2f49..78f1fa6a9 100755
--- a/tests/openpgp/clearsig.test
+++ b/tests/openpgp/clearsig.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Fixme: we should not only do a --verify but also the output.
diff --git a/tests/openpgp/conventional-mdc.test b/tests/openpgp/conventional-mdc.test
index b3cf10b3a..a5e5c4e44 100755
--- a/tests/openpgp/conventional-mdc.test
+++ b/tests/openpgp/conventional-mdc.test
@@ -1,32 +1,19 @@
#!/bin/sh
+# Copyright 2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
-algos="3des"
-
-if have_cipher_algo "IDEA"; then
- algos="$algos idea"
-fi
-
-if have_cipher_algo "CAST5"; then
- algos="$algos cast5"
-fi
-
-if have_cipher_algo "BLOWFISH"; then
- algos="$algos blowfish"
-fi
-
-if have_cipher_algo "AES"; then
- algos="$algos aes aes192 aes256"
-fi
-
-if have_cipher_algo "TWOFISH"; then
- algos="$algos twofish"
-fi
-
#info Checking conventional encryption
-for i in 0 1 2 3 9 10 11 19 20 21 22 23 39 40 41 8192 32000 ; do
- for ciph in $algos; do
+for ciph in `all_cipher_algos`; do
+ echo_n "$ciph "
+ for i in 0 1 2 3 9 10 11 19 20 21 22 23 39 40 41 8192 32000 ; do
# *BSD's dd can't cope with a count of 0
if test "$i" = "0"; then
: >z
@@ -40,3 +27,4 @@ for i in 0 1 2 3 9 10 11 19 20 21 22 23 39 40 41 8192 32000 ; do
cmp z y || error "$ciph/$i: mismatch"
done
done
+echo_n "| "
diff --git a/tests/openpgp/conventional.test b/tests/openpgp/conventional.test
index 8b75c8a50..1464ee229 100755
--- a/tests/openpgp/conventional.test
+++ b/tests/openpgp/conventional.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
@@ -9,29 +17,8 @@ for i in plain-2 data-32000 ; do
cmp $i y || error "$i: mismatch"
done
-algos="3des"
-
-if have_cipher_algo "IDEA"; then
- algos="$algos idea"
-fi
-
-if have_cipher_algo "CAST5"; then
- algos="$algos cast5"
-fi
-
-if have_cipher_algo "BLOWFISH"; then
- algos="$algos blowfish"
-fi
-
-if have_cipher_algo "AES"; then
- algos="$algos aes aes192 aes256"
-fi
-
-if have_cipher_algo "TWOFISH"; then
- algos="$algos twofish"
-fi
-
-for a in $algos; do
+for a in `all_cipher_algos`; do
+ echo_n "$a "
for i in plain-1 data-80000 ; do
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
--cipher-algo $a -c -o x --yes $i
@@ -39,3 +26,4 @@ for a in $algos; do
cmp $i y || error "$i: ($a) mismatch"
done
done
+echo_n "| "
diff --git a/tests/openpgp/decrypt-dsa.test b/tests/openpgp/decrypt-dsa.test
index 6dc7dc459..7220f8a22 100755
--- a/tests/openpgp/decrypt-dsa.test
+++ b/tests/openpgp/decrypt-dsa.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/decrypt.test b/tests/openpgp/decrypt.test
index aab416750..d3b5ddf41 100755
--- a/tests/openpgp/decrypt.test
+++ b/tests/openpgp/decrypt.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/defs.inc b/tests/openpgp/defs.inc
index 694e9ee1c..b33d9ebf8 100755
--- a/tests/openpgp/defs.inc
+++ b/tests/openpgp/defs.inc
@@ -1,4 +1,12 @@
-# definitions for the check scripts
+# Definitions for the OpenPGP test scripts -*- sh -*-
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#--------------------------------
#------ constants ---------------
@@ -139,6 +147,15 @@ have_hash_algo () {
fi
}
+all_cipher_algos () {
+ ../../g10/gpg2 --homedir . --version | grep "Cipher" | sed 's/^Cipher: //; s/,//g'
+}
+
+all_hash_algos () {
+ ../../g10/gpg2 --homedir . --version | grep "Hash" | sed 's/^Hash: //; s/,//g'
+}
+
+
set -e
pgmname=`basename $0`
#trap cleanup SIGHUP SIGINT SIGQUIT
diff --git a/tests/openpgp/detach.test b/tests/openpgp/detach.test
index 6a3ae05c5..9b68e001a 100755
--- a/tests/openpgp/detach.test
+++ b/tests/openpgp/detach.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/detachm.test b/tests/openpgp/detachm.test
index dc60bb239..d65bcf276 100755
--- a/tests/openpgp/detachm.test
+++ b/tests/openpgp/detachm.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/encrypt-dsa.test b/tests/openpgp/encrypt-dsa.test
index 4b9da35ff..01fe33aa8 100755
--- a/tests/openpgp/encrypt-dsa.test
+++ b/tests/openpgp/encrypt-dsa.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
@@ -9,29 +17,8 @@ for i in $plain_files $data_files ; do
cmp $i y || error "$i: mismatch"
done
-algos="3des"
-
-if have_cipher_algo "IDEA"; then
- algos="$algos idea"
-fi
-
-if have_cipher_algo "CAST5"; then
- algos="$algos cast5"
-fi
-
-if have_cipher_algo "BLOWFISH"; then
- algos="$algos blowfish"
-fi
-
-if have_cipher_algo "AES"; then
- algos="$algos aes aes192 aes256"
-fi
-
-if have_cipher_algo "TWOFISH"; then
- algos="$algos twofish"
-fi
-
-for ca in $algos ; do
+for ca in `all_cipher_algos` ; do
+ echo_n "$ca "
for i in $plain_files $data_files ; do
$GPG $dsa_keyrings --always-trust --cipher-algo $ca -e \
-o x --yes -r "$dsa_usrname2" $i
@@ -39,3 +26,4 @@ for ca in $algos ; do
cmp $i y || error "$i: mismatch"
done
done
+echo_n "| "
diff --git a/tests/openpgp/encrypt.test b/tests/openpgp/encrypt.test
index 35f35d0e5..c50c66c12 100755
--- a/tests/openpgp/encrypt.test
+++ b/tests/openpgp/encrypt.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
@@ -9,32 +17,12 @@ for i in $plain_files $data_files ; do
cmp $i y || error "$i: mismatch"
done
-algos="3des"
-
-if have_cipher_algo "IDEA"; then
- algos="$algos idea"
-fi
-
-if have_cipher_algo "CAST5"; then
- algos="$algos cast5"
-fi
-
-if have_cipher_algo "BLOWFISH"; then
- algos="$algos blowfish"
-fi
-
-if have_cipher_algo "AES"; then
- algos="$algos aes aes192 aes256"
-fi
-
-if have_cipher_algo "TWOFISH"; then
- algos="$algos twofish"
-fi
-
-for ca in $algos ; do
+for ca in `all_cipher_algos` ; do
+ echo_n "$ca "
for i in $plain_files $data_files ; do
$GPG --always-trust -e -o x --yes -r "$usrname2" --cipher-algo $ca $i
$GPG -o y --yes x
cmp $i y || error "$i: mismatch"
done
done
+echo_n "| "
diff --git a/tests/openpgp/encryptp.test b/tests/openpgp/encryptp.test
index 7df24efec..984f56ab8 100755
--- a/tests/openpgp/encryptp.test
+++ b/tests/openpgp/encryptp.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/genkey1024.test b/tests/openpgp/genkey1024.test
index e17e8c91c..74c036667 100755
--- a/tests/openpgp/genkey1024.test
+++ b/tests/openpgp/genkey1024.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/mds.test b/tests/openpgp/mds.test
index 6551d18e0..a4583a19a 100755
--- a/tests/openpgp/mds.test
+++ b/tests/openpgp/mds.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/multisig.test b/tests/openpgp/multisig.test
index ee194aef9..908b57842 100755
--- a/tests/openpgp/multisig.test
+++ b/tests/openpgp/multisig.test
@@ -1,4 +1,13 @@
#!/bin/sh
+# Copyright 2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
# Check that gpg verifies only signatures where there is no ambiguity
# in the order of packets. Needs the Demo Keys Lima and Mike.
diff --git a/tests/openpgp/seat.test b/tests/openpgp/seat.test
index 72ab27f41..28e69256c 100755
--- a/tests/openpgp/seat.test
+++ b/tests/openpgp/seat.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/signencrypt-dsa.test b/tests/openpgp/signencrypt-dsa.test
index 41bf83164..77ded1213 100755
--- a/tests/openpgp/signencrypt-dsa.test
+++ b/tests/openpgp/signencrypt-dsa.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/signencrypt.test b/tests/openpgp/signencrypt.test
index 2af50cb53..8ccbaf7ca 100755
--- a/tests/openpgp/signencrypt.test
+++ b/tests/openpgp/signencrypt.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/sigs-dsa.test b/tests/openpgp/sigs-dsa.test
index 2294cf55a..8b3b14f14 100755
--- a/tests/openpgp/sigs-dsa.test
+++ b/tests/openpgp/sigs-dsa.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/sigs.test b/tests/openpgp/sigs.test
index 79a3a18a4..86b0cdc7b 100755
--- a/tests/openpgp/sigs.test
+++ b/tests/openpgp/sigs.test
@@ -1,48 +1,26 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
-set -x
-
-#info Checking signatures
for i in $plain_files $data_files; do
echo "$usrpass1" | $GPG --passphrase-fd 0 -s -o x --yes $i
$GPG -o y --yes x
cmp $i y || error "$i: mismatch"
done
-# Using the DSA sig key - only 160 bit hashes
-for da in ripemd160 sha1 ; do
- for i in $plain_files; do
- echo "$usrpass1" | $GPG --passphrase-fd 0 --digest-algo $da \
- -s -o x --yes $i
- $GPG -o y --yes x
- cmp $i y || error "$i: mismatch"
- # process only the first one
- break
- done
-done
-
-# TODO: add the new SHAs here once we allow them to be used in new
-# documents.
-
-if have_pubkey_algo "RSA"; then
- # Using the RSA sig key - all hashes
- hash_algo_list="ripemd160 sha1 md5"
- if have_hash_algo "SHA224"; then
- hash_algo_list="$hash_algo_list sha224"
- fi
- if have_hash_algo "SHA256"; then
- hash_algo_list="$hash_algo_list sha256"
- fi
- if have_hash_algo "SHA384"; then
- hash_algo_list="$hash_algo_list sha384"
- fi
- if have_hash_algo "SHA512"; then
- hash_algo_list="$hash_algo_list sha512"
- fi
+for da in `all_hash_algos` ; do
+ echo_n "$da "
- for da in $hash_algo_list ; do
+ # RSA key, so any hash is okay
+ if have_pubkey_algo "RSA"; then
for i in $plain_files; do
$GPG -u $usrname3 --digest-algo $da -s -o x --yes $i
$GPG -o y --yes x
@@ -50,5 +28,18 @@ if have_pubkey_algo "RSA"; then
# process only the first one
break
done
- done
-fi
+ fi
+
+ # Using the DSA sig key - only 160 bit or larger hashes
+ if test $da != "MD5"; then
+ for i in $plain_files; do
+ echo "$usrpass1" | $GPG --passphrase-fd 0 --digest-algo $da \
+ -s -o x --yes $i
+ $GPG -o y --yes x
+ cmp $i y || error "$i: mismatch"
+ # process only the first one
+ break
+ done
+ fi
+done
+echo_n "| "
diff --git a/tests/openpgp/verify.test b/tests/openpgp/verify.test
index 41bd94a3f..eef61c769 100755
--- a/tests/openpgp/verify.test
+++ b/tests/openpgp/verify.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3
diff --git a/tests/openpgp/version.test b/tests/openpgp/version.test
index f1fd7284f..34733e27d 100755
--- a/tests/openpgp/version.test
+++ b/tests/openpgp/version.test
@@ -1,4 +1,12 @@
#!/bin/sh
+# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
+# 2007 Free Software Foundation, Inc.
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved. This file is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY, to the extent permitted by law; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. $srcdir/defs.inc || exit 3