diff options
author | Werner Koch <wk@gnupg.org> | 1998-10-25 20:00:01 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-10-25 20:00:01 +0100 |
commit | 5ccb92591e5ff9cf90efeb5ef527cf7a5fb08fcf (patch) | |
tree | 241529d030ede38fcdaee1a708c5956693ed159d /checks | |
parent | Epxerimenta support for GDBM keyings. (diff) | |
download | gnupg2-5ccb92591e5ff9cf90efeb5ef527cf7a5fb08fcf.tar.xz gnupg2-5ccb92591e5ff9cf90efeb5ef527cf7a5fb08fcf.zip |
some random changes
Diffstat (limited to 'checks')
-rw-r--r-- | checks/ChangeLog | 5 | ||||
-rwxr-xr-x | checks/defs.inc | 4 | ||||
-rwxr-xr-x | checks/mds.test | 14 | ||||
-rwxr-xr-x | checks/sigs.test | 7 |
4 files changed, 26 insertions, 4 deletions
diff --git a/checks/ChangeLog b/checks/ChangeLog index 4d99d8629..3b87c65e6 100644 --- a/checks/ChangeLog +++ b/checks/ChangeLog @@ -1,3 +1,8 @@ +Sun Oct 25 18:19:35 1998 Werner Koch (wk@isil.d.shuttle.de) + + * mds.test: Check whether TIGER is available. + * sigs.tesr: Ditto. + Wed Sep 23 12:25:07 1998 Werner Koch (wk@isil.d.shuttle.de) * run-gpg.patterns: New (because Solaris fgrep does not like -f -). diff --git a/checks/defs.inc b/checks/defs.inc index 49cbcf292..8e754a7bc 100755 --- a/checks/defs.inc +++ b/checks/defs.inc @@ -60,6 +60,10 @@ chdir () { #} +have_hash_algo () { + ../g10/gpgm --homedir . --version | grep "Hash:.*$1" >/dev/null +} + set -e pgmname=`basename $0` #trap cleanup SIGHUP SIGINT SIGQUIT diff --git a/checks/mds.test b/checks/mds.test index f945a6cbf..2d04812d4 100755 --- a/checks/mds.test +++ b/checks/mds.test @@ -1,7 +1,9 @@ #!/bin/sh + . $srcdir/defs.inc || exit 3 + test_one () { if [ "`grep $1 y | sed -e 's/.*=[ ]\(.*\)/\1/' -e 's/ //g'`" != "$2" ]; then failed="$failed $1" @@ -11,11 +13,15 @@ test_one () { failed="" #info Checking message digests -echo -n "" | $srcdir/run-gpgm --print-mds >y +echo -n "" | $srcdir/run-gpgm -v --print-mds >y test_one "MD5" "D41D8CD98F00B204E9800998ECF8427E" test_one "SHA1" "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709" test_one "RMD160" "9C1185A5C5E9FC54612808977EE8F548B2258D31" -test_one "TIGER" "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A" +if have_hash_algo "TIGER"; then + test_one "TIGER" "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A" +else + echo "Hash algorithm TIGER/192 is not installed" +fi [ "$failed" != "" ] && error "$failed failed for empty string" @@ -23,7 +29,9 @@ echo -n "abcdefghijklmnopqrstuvwxyz" | $srcdir/run-gpgm --print-mds >y test_one "MD5" "C3FCD3D76192E4007DFB496CCA67E13B" test_one "SHA1" "32D10C7B8CF96570CA04CE37F2A19D84240D3A89" test_one "RMD160" "F71C27109C692C1B56BBDCEB5B9D2865B3708DBC" -test_one "TIGER" "307DE5EE72A414172A0355CCBF120404E9EE7BF32F60110B" +if have_hash_algo "TIGER"; then + test_one "TIGER" "307DE5EE72A414172A0355CCBF120404E9EE7BF32F60110B" +fi [ "$failed" != "" ] && error "$failed failed for a..z" diff --git a/checks/sigs.test b/checks/sigs.test index 2446dde96..a32388948 100755 --- a/checks/sigs.test +++ b/checks/sigs.test @@ -9,7 +9,12 @@ for i in $plain_files $data_files; do cmp $i y || error "$i: mismatch" done -for da in ripemd160 sha1 md5 tiger; do +hash_algo_list="ripemd160 sha1 md5" +if have_hash_algo "TIGER"; then + hash_algo_list="$hash_algo_list tiger" +fi + +for da in $hash_algo_list ; do for i in $plain_files; do echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --digest-algo $da \ -s -o x --yes $i |