~ubuntu-branches/ubuntu/jaunty/gnupg2/jaunty

« back to all changes in this revision

Viewing changes to tests/pkits/validate-all-certs

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Urlichs
  • Date: 2006-01-24 04:31:42 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060124043142-pbg192or6qxv3yk2
Tags: 1.9.20-1
* New Upstream version. Closes:#306890,#344530
  * Closes:#320490: gpg-protect-tool fails to decrypt PKCS-12 files 
* Depend on libopensc2-dev, not -1-. Closes:#348106

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# validate-all-certs                                    -*- sh -*-
 
3
# Copyright (C) 2004 Free Software Foundation, Inc.  
 
4
#
 
5
# This file is part of GnuPG.
 
6
 
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 2 of the License, or
 
10
# (at your option) any later version.
 
11
 
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.
 
16
 
17
# You should have received a copy of the GNU General Public License
 
18
# along with this program; if not, write to the Free Software
 
19
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
20
 
 
21
. ${srcdir:-.}/common.sh || exit 2
 
22
 
 
23
while read dummy flag name; do 
 
24
    case $dummy in \#*) continue;; esac
 
25
    [ -z "$dummy" ] && continue;
 
26
 
 
27
    if ${GPGSM} -q --import --with-validation --disable-crl-checks \
 
28
             certs/$name ; then
 
29
        if [ "$flag" = 'p' ]; then
 
30
            pass "validating certificate \`$name' succeeded"
 
31
        elif [ "$flag" = 'f' ]; then
 
32
            fail "validating certificate \`$name' succeeded"
 
33
        elif [ "$flag" = '?' ]; then
 
34
            unresolved "validating certificate \`$name' succeeded"
 
35
        elif [ "$flag" = 'u' ]; then
 
36
            unsupported "validating certificate \`$name' succeeded"
 
37
        else
 
38
            info "validating certificate \`$name' succeeded - (flag=$flag)"
 
39
        fi
 
40
    else
 
41
        if [ "$flag" = 'p' ]; then
 
42
            fail "validating certificate \`$name' failed"
 
43
        elif [ "$flag" = 'f' ]; then
 
44
            pass "validating certificate \`$name' failed"
 
45
        elif [ "$flag" = '?' ]; then
 
46
            unresolved "validating certificate \`$name' failed"
 
47
        elif [ "$flag" = 'u' ]; then
 
48
            unsupported "validating certificate \`$name' failed"
 
49
        else
 
50
            info "validating certificate \`$name' failed - (flag=$flag)"
 
51
        fi
 
52
    fi
 
53
done < $srcdir/import-all-certs.data
 
54
 
 
55
final_result