blob: d4d01597260dd2d7ba7d4ecb410e09480f24b591 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/bin/sh
PERL="$1"
if test "$OSTYPE" = msdosdjgpp; then
PATH="../apps\;$PATH"
else
PATH="../apps:$PATH"
fi
export PATH
SSLEAY_CONFIG="-config CAss.cnf"
export SSLEAY_CONFIG
OPENSSL="`pwd`/../util/opensslwrap.sh"
export OPENSSL
/bin/rm -fr demoCA
# Could do '...CA.pl -newca <<EOF || exit 1
# EOF' but that seems too obscure to me. :)
OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
EOF
[ $? -eq 0 ] || exit 1
SSLEAY_CONFIG="-config Uss.cnf"
export SSLEAY_CONFIG
$PERL ../apps/CA.pl -newreq || exit 1
SSLEAY_CONFIG="-config ../apps/openssl.cnf"
export SSLEAY_CONFIG
# Same comment here.
$PERL ../apps/CA.pl -sign <<EOF
y
y
EOF
[ $? -eq 0 ] || exit 1
$PERL ../apps/CA.pl -verify newcert.pem || exit 1
/bin/rm -fr demoCA newcert.pem newreq.pem
|