2 # validate-all-certs - GnuPG import and validate tests -*- sh -*-
3 # Copyright (C) 2004, 2008 Free Software Foundation, Inc.
5 # This file is part of GnuPG.
7 # GnuPG is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # GnuPG is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
20 . ${srcdir:-.}/common.sh || exit 2
23 description="GnuPG Import with Validation"
24 info "Running $description tests"
26 while read dummy flag section name; do
27 case $dummy in \#*) continue;; esac
28 [ -z "$(echo $dummy)" ] && continue;
30 description="import and validate $name"
31 if ${GPGSM} -q --import --with-validation --disable-crl-checks \
33 if [ "$flag" = 'p' ]; then
34 pass "validating certificate \`$name' succeeded"
35 elif [ "$flag" = 'f' ]; then
36 fail "validating certificate \`$name' succeeded"
37 elif [ "$flag" = '?' ]; then
38 unresolved "validating certificate \`$name' succeeded"
39 elif [ "$flag" = 'u' ]; then
40 skip "validating certificate \`$name' succeeded"
42 info "validating certificate \`$name' succeeded - (flag=$flag)"
45 if [ "$flag" = 'p' ]; then
46 fail "validating certificate \`$name' failed"
47 elif [ "$flag" = 'f' ]; then
48 pass "validating certificate \`$name' failed"
49 elif [ "$flag" = '?' ]; then
50 unresolved "validating certificate \`$name' failed"
51 elif [ "$flag" = 'u' ]; then
52 skip "validating certificate \`$name' failed"
54 info "validating certificate \`$name' failed - (flag=$flag)"
57 done < $srcdir/import-all-certs.data