diff options
| author | beck <> | 1999-01-04 07:59:58 +0000 |
|---|---|---|
| committer | beck <> | 1999-01-04 07:59:58 +0000 |
| commit | 2ab850a424d07c3f877cbfc628f24480be0e7bac (patch) | |
| tree | 390ed99e97618ae9ee2bf82a32afe655e6a80caa /src/regress/lib/libssl/testrsa.sh | |
| parent | 6dc7513a633fd54f42172958ea7fc81510efc8dd (diff) | |
| download | openbsd-2ab850a424d07c3f877cbfc628f24480be0e7bac.tar.gz openbsd-2ab850a424d07c3f877cbfc628f24480be0e7bac.tar.bz2 openbsd-2ab850a424d07c3f877cbfc628f24480be0e7bac.zip | |
ssl lib test scripts. Need to be tested so as not to break build process
before this libssl dir is added to the upper level Makefile.
Diffstat (limited to 'src/regress/lib/libssl/testrsa.sh')
| -rw-r--r-- | src/regress/lib/libssl/testrsa.sh | 35 |
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 | |||
| 5 | echo | ||
| 6 | echo RSA paramters test - NOTE THAT THIS WILL ONLY WORK IF YOU HAVE | ||
| 7 | echo compiled libssl with the src-patent tree, currently living in | ||
| 8 | echo ~ryker/src-patent.tar.gz on cvs. | ||
| 9 | echo | ||
| 10 | echo This will *not* work with what\'s in the tree, rsa is not in that. | ||
| 11 | echo | ||
| 12 | sleep 3 | ||
| 13 | |||
| 14 | |||
| 15 | # Generate RSA private key | ||
| 16 | ssleay genrsa -out rsakey.pem | ||
| 17 | if [ $? != 0 ]; then | ||
| 18 | exit 1; | ||
| 19 | fi | ||
| 20 | |||
| 21 | |||
| 22 | # Denerate an RSA certificate | ||
| 23 | ssleay req -config ssleay.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem | ||
| 24 | if [ $? != 0 ]; then | ||
| 25 | exit 1; | ||
| 26 | fi | ||
| 27 | |||
| 28 | |||
| 29 | # Now check the certificate | ||
| 30 | ssleay x509 -text -in rsacert.pem | ||
| 31 | if [ $? != 0 ]; then | ||
| 32 | exit 1; | ||
| 33 | fi | ||
| 34 | |||
| 35 | exit 0 | ||
