blob: 17c6abf7ce5f53841dd6a4025f1b8348c0bfc67c (
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: testrsa.sh,v 1.6 2002/01/02 15:13:18 art Exp $
#Test RSA certificate generation of openssl
cd $1
# Generate RSA private key
openssl genrsa -out rsakey.pem
if [ $? != 0 ]; then
exit 1;
fi
# Generate an RSA certificate
openssl req -config $2/openssl.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem
if [ $? != 0 ]; then
exit 1;
fi
# Now check the certificate
openssl x509 -text -in rsacert.pem
if [ $? != 0 ]; then
exit 1;
fi
exit 0
|