* Makefile.am, options.in: Rename options.in to options since it no longer

needs to be a generated file.

* sigs.test: TODO note to add the new SHAs when we start generating them.

* mds.test: Test the new SHAs.
This commit is contained in:
David Shaw 2003-04-23 20:08:38 +00:00
parent b394776a80
commit 4e472d09a8
5 changed files with 54 additions and 22 deletions

View File

@ -1,3 +1,13 @@
2003-04-23 David Shaw <dshaw@jabberwocky.com>
* Makefile.am, options.in: Rename options.in to options since it
no longer needs to be a generated file.
* sigs.test: TODO note to add the new SHAs when we start
generating them.
* mds.test: Test the new SHAs.
2002-05-10 Werner Koch <wk@gnupg.org>
* Makefile.am: Add gpg_dearmor to all targets where it is used.

View File

@ -35,7 +35,7 @@ TESTS = version.test mds.test \
TEST_FILES = pubring.asc secring.asc plain-1o.asc plain-2o.asc plain-3o.asc \
plain-1.asc plain-2.asc plain-3.asc plain-1-pgp.asc \
pubring.pkr.asc secring.skr.asc secdemo.asc pubdemo.asc options.in
pubring.pkr.asc secring.skr.asc secdemo.asc pubdemo.asc options
DATA_FILES = data-500 data-9000 data-32000 data-80000 plain-large
@ -43,7 +43,7 @@ EXTRA_DIST = defs.inc $(TESTS) $(TEST_FILES) \
mkdemodirs signdemokey
CLEANFILES = prepared.stamp x y yy z out err $(DATA_FILES) \
plain-1 plain-2 plain-3 trustdb.gpg *.lock .\#lk* \
*.test.log options gpg_dearmor \
*.test.log gpg_dearmor \
pubring.gpg secring.gpg pubring.pkr secring.skr
DISTCLEANFILES = pubring.gpg~ random_seed
@ -54,16 +54,10 @@ distclean-local:
$(srcdir)/mkdemodirs --clean
prepared.stamp: ./pubring.gpg ./secring.gpg ./plain-1 ./plain-2 ./plain-3 \
./pubring.pkr ./secring.skr ./options ./gpg_dearmor \
$(DATA_FILES)
./pubring.pkr ./secring.skr ./gpg_dearmor $(DATA_FILES)
$(GPG_IMPORT) $(srcdir)/pubdemo.asc
echo timestamp >./prepared.stamp
./options: $(srcdir)/options.in
cat $(srcdir)/options.in >./options
@set -e; if echo "@DYNAMIC_CIPHER_MODS@" |grep tiger >/dev/null ;then \
echo load-extension ../cipher/tiger >>./options; fi
./gpg_dearmor:
echo '#!/bin/sh' >./gpg_dearmor
echo "../g10/gpg --no-options --no-greeting \

View File

@ -5,7 +5,7 @@
test_one () {
if [ "`grep $1 y | sed -e 's/.*=[ ]\(.*\)/\1/' -e 's/ //g'`" != "$2" ]; then
if [ "`grep $1 y | sed -e 's/:[^:]*:\(.*\):/\1/'`" != "$2" ]; then
failed="$failed $1"
fi
}
@ -13,24 +13,49 @@ test_one () {
failed=""
#info Checking message digests
cat /dev/null | $GPG -v --print-mds >y
test_one "MD5" "D41D8CD98F00B204E9800998ECF8427E"
test_one "SHA1" "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709"
test_one "RMD160" "9C1185A5C5E9FC54612808977EE8F548B2258D31"
if have_hash_algo "TIGER"; then
test_one "TIGER" "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A"
cat /dev/null | $GPG --with-colons --print-mds >y
# MD5
test_one ":1:" "D41D8CD98F00B204E9800998ECF8427E"
# SHA-1
test_one ":2:" "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709"
# RMD160
test_one ":3:" "9C1185A5C5E9FC54612808977EE8F548B2258D31"
# TIGER
if have_hash_algo "TIGER192"; then
test_one ":6:" "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A"
else
echo "Hash algorithm TIGER/192 is not installed"
fi
# SHA-256
test_one ":8:" "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"
# SHA-384
if have_hash_algo "SHA384"; then
test_one ":9:" "38B060A751AC96384CD9327EB1B1E36A21FDB71114BE07434C0CC7BF63F6E1DA274EDEBFE76F65FBD51AD2F14898B95B"
else
echo "Hash algorithm SHA-384 is not installed"
fi
# SHA-512
if have_hash_algo "SHA512"; then
test_one ":10:" "CF83E1357EEFB8BDF1542850D66D8007D620E4050B5715DC83F4A921D36CE9CE47D0D13C5D85F2B0FF8318D2877EEC2F63B931BD47417A81A538327AF927DA3E"
else
echo "Hash algorithm SHA-512 is not installed"
fi
[ "$failed" != "" ] && error "$failed failed for empty string"
echo_n "abcdefghijklmnopqrstuvwxyz" | $GPG --print-mds >y
test_one "MD5" "C3FCD3D76192E4007DFB496CCA67E13B"
test_one "SHA1" "32D10C7B8CF96570CA04CE37F2A19D84240D3A89"
test_one "RMD160" "F71C27109C692C1B56BBDCEB5B9D2865B3708DBC"
if have_hash_algo "TIGER"; then
test_one "TIGER" "307DE5EE72A414172A0355CCBF120404E9EE7BF32F60110B"
echo_n "abcdefghijklmnopqrstuvwxyz" | $GPG --with-colons --print-mds >y
test_one ":1:" "C3FCD3D76192E4007DFB496CCA67E13B"
test_one ":2:" "32D10C7B8CF96570CA04CE37F2A19D84240D3A89"
test_one ":3:" "F71C27109C692C1B56BBDCEB5B9D2865B3708DBC"
if have_hash_algo "TIGER192"; then
test_one ":6:" "307DE5EE72A414172A0355CCBF120404E9EE7BF32F60110B"
fi
test_one ":8:" "71C480DF93D6AE2F1EFAD1447C66C9525E316218CF51FC8D9ED832F2DAF18B73"
if have_hash_algo "SHA384"; then
test_one ":9:" "FEB67349DF3DB6F5924815D6C3DC133F091809213731FE5C7B5F4999E463479FF2877F5F2936FA63BB43784B12F3EBB4"
fi
if have_hash_algo "SHA512"; then
test_one ":10:" "4DBFF86CC2CA1BAE1E16468A05CB9881C97F1753BCE3619034898FAA1AABE429955A1BF8EC483D7421FE3C1646613A59ED5441FB0F321389F77F48A879C7B1F1"
fi

View File

@ -9,6 +9,9 @@ for i in $plain_files $data_files; do
cmp $i y || error "$i: mismatch"
done
# TODO: add the new SHAs here once we allow them to be used in new
# documents.
hash_algo_list="ripemd160 sha1 md5"
if have_hash_algo "TIGER192"; then
hash_algo_list="$hash_algo_list tiger192"