Added gnutls_x509_crl_reason_flags_t.
[gnutls.git] / tests / pkcs12-decode / pkcs12
bloba2ee20bdd48427ca7907b15d4e5140d2342c5039
1 #!/bin/sh
3 # Copyright (C) 2004-2006, 2008, 2010, 2012 Free Software Foundation,
4 # Inc.
6 # Author: Simon Josefsson
8 # This file is part of GnuTLS.
10 # GnuTLS is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by the
12 # Free Software Foundation; either version 3 of the License, or (at
13 # your option) any later version.
15 # GnuTLS is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with GnuTLS; if not, write to the Free Software Foundation,
22 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 srcdir=${srcdir:-.}
25 CERTTOOL=${CERTTOOL:-../../src/certtool}
26 DEBUG=""
28 if test "x$1" != "x";then
29 DEBUG="1"
32 ret=0
33 for p12 in 'client.p12 foobar' noclient.p12 unclient.p12 pkcs12_2certs.p12; do
34 set -- $p12
35 file=$1
36 passwd=$2
37 if test "x$DEBUG" != "x";then
38 $CERTTOOL -d 99 --p12-info --inder --password "$passwd" \
39 --infile $srcdir/$file
40 else
41 $CERTTOOL --p12-info --inder --password "$passwd" \
42 --infile $srcdir/$file >/dev/null 2>&1
44 rc=$?
45 if test $rc != 0; then
46 echo "NEON PKCS12 FATAL $p12"
47 ret=1
49 done
51 file=test-null.p12
52 $CERTTOOL --p12-info --inder --null-password --infile $file >/dev/null 2>&1
53 rc=$?
54 if test $rc != 0; then
55 echo "PKCS12 FATAL $file"
56 ret=1
59 #echo "NEON PKCS12 DONE (rc $ret)"
60 exit $ret