diff options
author | jsing <> | 2014-08-26 17:50:07 +0000 |
---|---|---|
committer | jsing <> | 2014-08-26 17:50:07 +0000 |
commit | ad993f95f7233dab030ff796264396c977cb3248 (patch) | |
tree | fdf80e64b4b68946a21ff873801e9c17656a9878 /src/regress/usr.bin/openssl/testdsa.sh | |
parent | f3755acd5513f85ff734de6a822b6f804d3776ce (diff) | |
download | openbsd-ad993f95f7233dab030ff796264396c977cb3248.tar.gz openbsd-ad993f95f7233dab030ff796264396c977cb3248.tar.bz2 openbsd-ad993f95f7233dab030ff796264396c977cb3248.zip |
Update regress to follow openssl(1) move.
Diffstat (limited to 'src/regress/usr.bin/openssl/testdsa.sh')
-rw-r--r-- | src/regress/usr.bin/openssl/testdsa.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/regress/usr.bin/openssl/testdsa.sh b/src/regress/usr.bin/openssl/testdsa.sh new file mode 100644 index 0000000000..32293d8ff3 --- /dev/null +++ b/src/regress/usr.bin/openssl/testdsa.sh | |||
@@ -0,0 +1,29 @@ | |||
1 | #!/bin/sh | ||
2 | # $OpenBSD: testdsa.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | ||
3 | |||
4 | |||
5 | #Test DSA certificate generation of openssl | ||
6 | |||
7 | cd $1 | ||
8 | |||
9 | # Generate DSA paramter set | ||
10 | openssl dsaparam 512 -out dsa512.pem | ||
11 | if [ $? != 0 ]; then | ||
12 | exit 1; | ||
13 | fi | ||
14 | |||
15 | |||
16 | # Denerate a DSA certificate | ||
17 | openssl req -config $2/openssl.cnf -x509 -newkey dsa:dsa512.pem -out testdsa.pem -keyout testdsa.key | ||
18 | if [ $? != 0 ]; then | ||
19 | exit 1; | ||
20 | fi | ||
21 | |||
22 | |||
23 | # Now check the certificate | ||
24 | openssl x509 -text -in testdsa.pem | ||
25 | if [ $? != 0 ]; then | ||
26 | exit 1; | ||
27 | fi | ||
28 | |||
29 | exit 0 | ||