summaryrefslogtreecommitdiff
path: root/regress/lib/libssl/testdsa.sh
blob: dc5d7b97b565105ccc2a4125d056019b88d48dcc (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
#!/bin/sh

#Test DSA certificate generation of ssleay

cd $1

# Generate DSA paramter set
ssleay dsaparam 512 -out dsa512.pem
if [ $? != 0 ]; then
        exit 1;
fi


# Denerate a DSA certificate
ssleay req -config $2/ssleay.cnf -x509 -newkey dsa:dsa512.pem -out testdsa.pem -keyout testdsa.key
if [ $? != 0 ]; then
        exit 1;
fi


# Now check the certificate
ssleay x509 -text -in testdsa.pem
if [ $? != 0 ]; then
        exit 1;
fi

exit 0