summaryrefslogtreecommitdiffstats
path: root/checks/sigs.test
blob: a3238894893aa7739de5fe429d508d8b2976cf45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

. $srcdir/defs.inc || exit 3

#info Checking signatures
for i in $plain_files $data_files; do
    echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 -s -o x --yes $i
    $srcdir/run-gpg -o y --yes x
    cmp $i y || error "$i: mismatch"
done

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
	$srcdir/run-gpg -o y --yes x
	cmp $i y || error "$i: mismatch"
	# process only the first one
	break
    done
done