3 # Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 # Author: Simon Josefsson
7 # This file is part of GnuTLS.
9 # GnuTLS is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by the
11 # Free Software Foundation; either version 3 of the License, or (at
12 # your option) any later version.
14 # GnuTLS is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GnuTLS; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 CERTTOOL=${CERTTOOL:-../../src/certtool$EXEEXT}
28 PARAMS="--generate-certificate --load-privkey $srcdir/key-user.pem --load-ca-privkey $srcdir/key-ca.pem --template tmpl"
32 #$CERTTOOL $PARAMS --load-ca-certificate $srcdir/ca-gnutls-keyid.pem \
33 # --outfile user-gnutls-keyid.pem 2> /dev/null
35 #$CERTTOOL $PARAMS --load-ca-certificate $srcdir/ca-no-keyid.pem \
36 # --outfile user-no-keyid.pem 2> /dev/null
38 $CERTTOOL $PARAMS --load-ca-certificate $srcdir/ca-weird-keyid.pem \
39 --outfile user-weird-keyid.pem 2> /dev/null
41 if $CERTTOOL -i < user-weird-keyid.pem \
42 | grep '7a2c7a6097460603cbfb28e8e219df18deeb4e0d' > /dev/null; then
45 echo "Could not find CA SKI in user certificate."
49 rm -f tmpl user-gnutls-keyid.pem user-no-keyid.pem user-weird-keyid.pem