3 # Copyright (C) 2006-2012 Free Software Foundation, Inc.
5 # This file is part of GnuTLS.
7 # GnuTLS is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 3 of the License, or (at
10 # your option) any later version.
12 # GnuTLS is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GnuTLS; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 CERTTOOL
=${CERTTOOL:-../../src/certtool$EXEEXT}
27 TSTAMP
=`datefudge "2006-09-23" date -u +%s || true`
28 if test "$TSTAMP" != "1158962400"; then
29 echo "You need datefudge to run this test"
33 # Note that in rare cases this test may fail because the
34 # time set using datefudge could have changed since the generation
35 # (if example the system was busy)
40 while [ "$rc" != "0" -a $counter -le 3 ]
43 datefudge
"2007-04-22" \
44 $CERTTOOL --generate-self-signed \
45 --load-privkey $srcdir/template-test.key \
46 --template $srcdir/template-test.tmpl \
47 --outfile tmp-tt.pem
2>/dev
/null
49 diff $srcdir/template-test.pem tmp-tt.pem
51 counter
=`expr $counter + 1`
55 if test "$rc" != "0"; then
65 while [ "$rc" != "0" -a $counter -le 3 ]
67 datefudge
"2007-04-22" \
68 $CERTTOOL --generate-self-signed \
69 --load-privkey $srcdir/template-test.key \
70 --template $srcdir/template-utf8.tmpl \
71 --outfile tmp-tt.pem
2>/dev
/null
73 diff $srcdir/template-utf8.pem tmp-tt.pem
75 counter
=`expr $counter + 1`
79 if test "$rc" != "0"; then
80 echo "Test 2 (UTF8) failed"