blob: 3f4c328acd36bca64bb0c3301545a6c661151375 (
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
|
#!/bin/sh
#Test RSA certificate generation of ssleay
echo
echo RSA paramters test - NOTE THAT THIS WILL ONLY WORK IF YOU HAVE
echo compiled libssl with the src-patent tree, currently living in
echo ~ryker/src-patent.tar.gz on cvs.
echo
echo This will *not* work with what\'s in the tree, rsa is not in that.
echo
sleep 3
cd $1
# Generate RSA private key
ssleay genrsa -out rsakey.pem
if [ $? != 0 ]; then
exit 1;
fi
# Denerate an RSA certificate
ssleay req -config $2/ssleay.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem
if [ $? != 0 ]; then
exit 1;
fi
# Now check the certificate
ssleay x509 -text -in rsacert.pem
if [ $? != 0 ]; then
exit 1;
fi
exit 0
|