summaryrefslogtreecommitdiff
path: root/regress/lib/libssl/testdsa.sh
blob: 48526eec119bacc6d649f8ea1a857fc61752f6a4 (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
#!/bin/sh
#	$OpenBSD: testdsa.sh,v 1.4 2001/01/29 02:05:48 niklas Exp $


#Test DSA certificate generation of openssl

cd $1

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


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


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

exit 0