3 # Copyright (C) 2006, 2008, 2010, 2012 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 $CERTTOOL --inder --certificate-info \
29 --infile $srcdir/MD5CollisionCA.cer
> ca.pem
30 $CERTTOOL --inder --certificate-info \
31 --infile $srcdir/TargetCollidingCertificate1.cer
> client1.pem
32 $CERTTOOL --inder --certificate-info \
33 --infile $srcdir/TargetCollidingCertificate2.cer
> client2.pem
35 cat client1.pem ca.pem
> chain1.pem
36 cat client2.pem ca.pem
> chain2.pem
38 $CERTTOOL --verify-chain < chain1.pem | \
39 grep 'Not verified.' |
grep 'insecure algorithm' >/dev
/null
40 $CERTTOOL --verify-chain < chain2.pem | \
41 grep 'Not verified.' |
grep 'insecure algorithm' >/dev
/null
43 rm -f ca.pem client1.pem client2.pem \
44 chain1.pem chain2.pem \