summaryrefslogtreecommitdiff
path: root/src/regress/usr.bin/openssl/testdsa.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/usr.bin/openssl/testdsa.sh')
-rw-r--r--src/regress/usr.bin/openssl/testdsa.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/regress/usr.bin/openssl/testdsa.sh b/src/regress/usr.bin/openssl/testdsa.sh
index 32293d8ff3..a04ba171ff 100644
--- a/src/regress/usr.bin/openssl/testdsa.sh
+++ b/src/regress/usr.bin/openssl/testdsa.sh
@@ -1,5 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# $OpenBSD: testdsa.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ 2# $OpenBSD: testdsa.sh,v 1.2 2018/02/06 02:31:13 tb Exp $
3 3
4 4
5#Test DSA certificate generation of openssl 5#Test DSA certificate generation of openssl
@@ -7,21 +7,22 @@
7cd $1 7cd $1
8 8
9# Generate DSA paramter set 9# Generate DSA paramter set
10openssl dsaparam 512 -out dsa512.pem 10openssl_bin=${OPENSSL:-/usr/bin/openssl}
11$openssl_bin dsaparam 512 -out dsa512.pem
11if [ $? != 0 ]; then 12if [ $? != 0 ]; then
12 exit 1; 13 exit 1;
13fi 14fi
14 15
15 16
16# Denerate a DSA certificate 17# Denerate a DSA certificate
17openssl req -config $2/openssl.cnf -x509 -newkey dsa:dsa512.pem -out testdsa.pem -keyout testdsa.key 18$openssl_bin req -config $2/openssl.cnf -x509 -newkey dsa:dsa512.pem -out testdsa.pem -keyout testdsa.key
18if [ $? != 0 ]; then 19if [ $? != 0 ]; then
19 exit 1; 20 exit 1;
20fi 21fi
21 22
22 23
23# Now check the certificate 24# Now check the certificate
24openssl x509 -text -in testdsa.pem 25$openssl_bin x509 -text -in testdsa.pem
25if [ $? != 0 ]; then 26if [ $? != 0 ]; then
26 exit 1; 27 exit 1;
27fi 28fi