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