gnutls_srtp_get_profile_by_name -> gnutls_srtp_get_profile_id
[gnutls.git] / tests / pkcs12-decode / pkcs12
blobca5882730a44fb950e3cc292f40a4c01898ec09a
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 top_builddir=${top_builddir:-../..}
26 CERTTOOL=${CERTTOOL:-${top_builddir}/src/certtool}
27 DEBUG=""
29 if test "x$1" != "x";then
30 DEBUG="1"
33 ret=0
34 for p12 in 'client.p12 foobar' noclient.p12 unclient.p12 pkcs12_2certs.p12; do
35 set -- $p12
36 file=$1
37 passwd=$2
38 if test "x$DEBUG" != "x";then
39 $CERTTOOL -d 99 --p12-info --inder --password "$passwd" \
40 --infile $srcdir/$file
41 else
42 $CERTTOOL --p12-info --inder --password "$passwd" \
43 --infile $srcdir/$file >/dev/null 2>&1
45 rc=$?
46 if test $rc != 0; then
47 echo "NEON PKCS12 FATAL $p12"
48 ret=1
50 done
52 file=test-null.p12
53 $CERTTOOL --p12-info --inder --null-password --infile $srcdir/$file >/dev/null 2>&1
54 rc=$?
55 if test $rc != 0; then
56 echo "PKCS12 FATAL $file"
57 ret=1
60 #echo "NEON PKCS12 DONE (rc $ret)"
61 exit $ret