diff options
Diffstat (limited to 'src/regress/lib/libssl/testdsa.sh')
| -rw-r--r-- | src/regress/lib/libssl/testdsa.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/regress/lib/libssl/testdsa.sh b/src/regress/lib/libssl/testdsa.sh new file mode 100644 index 0000000000..dc5d7b97b5 --- /dev/null +++ b/src/regress/lib/libssl/testdsa.sh | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | #Test DSA certificate generation of ssleay | ||
| 4 | |||
| 5 | cd $1 | ||
| 6 | |||
| 7 | # Generate DSA paramter set | ||
| 8 | ssleay dsaparam 512 -out dsa512.pem | ||
| 9 | if [ $? != 0 ]; then | ||
| 10 | exit 1; | ||
| 11 | fi | ||
| 12 | |||
| 13 | |||
| 14 | # Denerate a DSA certificate | ||
| 15 | ssleay req -config $2/ssleay.cnf -x509 -newkey dsa:dsa512.pem -out testdsa.pem -keyout testdsa.key | ||
| 16 | if [ $? != 0 ]; then | ||
| 17 | exit 1; | ||
| 18 | fi | ||
| 19 | |||
| 20 | |||
| 21 | # Now check the certificate | ||
| 22 | ssleay x509 -text -in testdsa.pem | ||
| 23 | if [ $? != 0 ]; then | ||
| 24 | exit 1; | ||
| 25 | fi | ||
| 26 | |||
| 27 | exit 0 | ||
