summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/testrsa.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libssl/testrsa.sh')
-rw-r--r--src/regress/lib/libssl/testrsa.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/regress/lib/libssl/testrsa.sh b/src/regress/lib/libssl/testrsa.sh
new file mode 100644
index 0000000000..79c578834a
--- /dev/null
+++ b/src/regress/lib/libssl/testrsa.sh
@@ -0,0 +1,35 @@
1#!/bin/sh
2
3#Test RSA certificate generation of ssleay
4
5echo
6echo RSA paramters test - NOTE THAT THIS WILL ONLY WORK IF YOU HAVE
7echo compiled libssl with the src-patent tree, currently living in
8echo ~ryker/src-patent.tar.gz on cvs.
9echo
10echo This will *not* work with what\'s in the tree, rsa is not in that.
11echo
12sleep 3
13
14
15# Generate RSA private key
16ssleay genrsa -out rsakey.pem
17if [ $? != 0 ]; then
18 exit 1;
19fi
20
21
22# Denerate an RSA certificate
23ssleay req -config ssleay.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem
24if [ $? != 0 ]; then
25 exit 1;
26fi
27
28
29# Now check the certificate
30ssleay x509 -text -in rsacert.pem
31if [ $? != 0 ]; then
32 exit 1;
33fi
34
35exit 0