summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/test/testca
blob: 8215ebb5d1d0194da164aad5b2add2eb36ae50fa (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
44
45
46
47
48
#!/bin/sh

SH="/bin/sh"
if test "$OSTYPE" = msdosdjgpp; then
    PATH=./apps\;../apps\;$PATH
else
    PATH=../apps:$PATH
fi
export SH PATH

SSLEAY_CONFIG="-config CAss.cnf"
export SSLEAY_CONFIG

/bin/rm -fr demoCA
$SH ../apps/CA.sh -newca <<EOF
EOF

if [ $? != 0 ]; then
	exit 1;
fi

SSLEAY_CONFIG="-config Uss.cnf"
export SSLEAY_CONFIG
$SH ../apps/CA.sh -newreq
if [ $? != 0 ]; then
	exit 1;
fi


SSLEAY_CONFIG="-config ../apps/openssl.cnf"
export SSLEAY_CONFIG
$SH ../apps/CA.sh -sign  <<EOF
y
y
EOF
if [ $? != 0 ]; then
	exit 1;
fi


$SH ../apps/CA.sh -verify newcert.pem
if [ $? != 0 ]; then
	exit 1;
fi

/bin/rm -fr demoCA newcert.pem newreq.pem
#usage: CA -newcert|-newreq|-newca|-sign|-verify

OpenPOWER on IntegriCloud