diff options
-rw-r--r-- | src/regress/usr.bin/openssl/Makefile | 10 | ||||
-rwxr-xr-x | src/regress/usr.bin/openssl/appstest.sh | 2 | ||||
-rw-r--r-- | src/regress/usr.bin/openssl/test_client.sh | 4 | ||||
-rw-r--r-- | src/regress/usr.bin/openssl/test_server.sh | 4 | ||||
-rw-r--r-- | src/regress/usr.bin/openssl/testdsa.sh | 9 | ||||
-rw-r--r-- | src/regress/usr.bin/openssl/testenc.sh | 4 | ||||
-rw-r--r-- | src/regress/usr.bin/openssl/testrsa.sh | 9 |
7 files changed, 22 insertions, 20 deletions
diff --git a/src/regress/usr.bin/openssl/Makefile b/src/regress/usr.bin/openssl/Makefile index d1c609980c..c6bc2748cc 100644 --- a/src/regress/usr.bin/openssl/Makefile +++ b/src/regress/usr.bin/openssl/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.4 2016/11/06 11:56:43 inoguchi Exp $ | 1 | # $OpenBSD: Makefile,v 1.5 2018/02/06 02:31:13 tb Exp $ |
2 | 2 | ||
3 | SUBDIR= options | 3 | SUBDIR= options |
4 | 4 | ||
@@ -52,13 +52,13 @@ CLEANFILES+=${CIPHER}.${ENC} ${CIPHER}.${ENC}.b64 ${CLEAR2}.${ENC} ${CLEAR2}.${E | |||
52 | .endfor | 52 | .endfor |
53 | 53 | ||
54 | ssl-enc: | 54 | ssl-enc: |
55 | sh ${.CURDIR}/testenc.sh ${.OBJDIR} ${.CURDIR} | 55 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/testenc.sh ${.OBJDIR} ${.CURDIR} |
56 | ssl-dsa: | 56 | ssl-dsa: |
57 | sh ${.CURDIR}/testdsa.sh ${.OBJDIR} ${.CURDIR} | 57 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/testdsa.sh ${.OBJDIR} ${.CURDIR} |
58 | ssl-rsa: | 58 | ssl-rsa: |
59 | sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR} | 59 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR} |
60 | appstest: | 60 | appstest: |
61 | sh ${.CURDIR}/appstest.sh ${.OBJDIR} ${.CURDIR} | 61 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/appstest.sh ${.OBJDIR} ${.CURDIR} |
62 | 62 | ||
63 | clean: | 63 | clean: |
64 | rm -rf ${CLEANFILES} | 64 | rm -rf ${CLEANFILES} |
diff --git a/src/regress/usr.bin/openssl/appstest.sh b/src/regress/usr.bin/openssl/appstest.sh index f241e2c34b..24d1d741a0 100755 --- a/src/regress/usr.bin/openssl/appstest.sh +++ b/src/regress/usr.bin/openssl/appstest.sh | |||
@@ -6,7 +6,7 @@ | |||
6 | # output : all files generated by this script go under $ssldir | 6 | # output : all files generated by this script go under $ssldir |
7 | # | 7 | # |
8 | 8 | ||
9 | openssl_bin=/usr/bin/openssl | 9 | openssl_bin=${OPENSSL:-/usr/bin/openssl} |
10 | 10 | ||
11 | uname_s=`uname -s | grep 'MINGW'` | 11 | uname_s=`uname -s | grep 'MINGW'` |
12 | if [ "$uname_s" = "" ] ; then | 12 | if [ "$uname_s" = "" ] ; then |
diff --git a/src/regress/usr.bin/openssl/test_client.sh b/src/regress/usr.bin/openssl/test_client.sh index 36c6ac4add..fed2baace0 100644 --- a/src/regress/usr.bin/openssl/test_client.sh +++ b/src/regress/usr.bin/openssl/test_client.sh | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: test_client.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # $OpenBSD: test_client.sh,v 1.2 2018/02/06 02:31:13 tb Exp $ |
3 | 3 | ||
4 | echo | 4 | echo |
5 | echo This starts a tls1 mode client to talk to the server run by | 5 | echo This starts a tls1 mode client to talk to the server run by |
@@ -9,4 +9,4 @@ echo type in this window after ssl negotiation and your output should | |||
9 | echo be echoed by the server. | 9 | echo be echoed by the server. |
10 | echo | 10 | echo |
11 | echo | 11 | echo |
12 | /usr/bin/openssl s_client -tls1 | 12 | ${OPENSSL:-/usr/bin/openssl} s_client -tls1 |
diff --git a/src/regress/usr.bin/openssl/test_server.sh b/src/regress/usr.bin/openssl/test_server.sh index b4fd2560df..ec4a78a27a 100644 --- a/src/regress/usr.bin/openssl/test_server.sh +++ b/src/regress/usr.bin/openssl/test_server.sh | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: test_server.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # $OpenBSD: test_server.sh,v 1.2 2018/02/06 02:31:13 tb Exp $ |
3 | 3 | ||
4 | echo This starts a tls1 mode server using the DSA certificate in ./server.pem | 4 | echo This starts a tls1 mode server using the DSA certificate in ./server.pem |
5 | echo Run ./testclient.sh in another window and type at it, you should | 5 | echo Run ./testclient.sh in another window and type at it, you should |
@@ -7,4 +7,4 @@ echo see the results of the ssl negotiation, and stuff you type in the client | |||
7 | echo should echo in this window | 7 | echo should echo in this window |
8 | echo | 8 | echo |
9 | echo | 9 | echo |
10 | /usr/bin/openssl s_server -tls1 -key testdsa.key -cert testdsa.pem | 10 | ${OPENSSL:-/usr/bin/openssl} s_server -tls1 -key testdsa.key -cert testdsa.pem |
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 @@ | |||
7 | cd $1 | 7 | cd $1 |
8 | 8 | ||
9 | # Generate DSA paramter set | 9 | # Generate DSA paramter set |
10 | openssl dsaparam 512 -out dsa512.pem | 10 | openssl_bin=${OPENSSL:-/usr/bin/openssl} |
11 | $openssl_bin dsaparam 512 -out dsa512.pem | ||
11 | if [ $? != 0 ]; then | 12 | if [ $? != 0 ]; then |
12 | exit 1; | 13 | exit 1; |
13 | fi | 14 | fi |
14 | 15 | ||
15 | 16 | ||
16 | # Denerate a DSA certificate | 17 | # Denerate a DSA certificate |
17 | openssl 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 |
18 | if [ $? != 0 ]; then | 19 | if [ $? != 0 ]; then |
19 | exit 1; | 20 | exit 1; |
20 | fi | 21 | fi |
21 | 22 | ||
22 | 23 | ||
23 | # Now check the certificate | 24 | # Now check the certificate |
24 | openssl x509 -text -in testdsa.pem | 25 | $openssl_bin x509 -text -in testdsa.pem |
25 | if [ $? != 0 ]; then | 26 | if [ $? != 0 ]; then |
26 | exit 1; | 27 | exit 1; |
27 | fi | 28 | fi |
diff --git a/src/regress/usr.bin/openssl/testenc.sh b/src/regress/usr.bin/openssl/testenc.sh index 72c87a87a9..89b3068a08 100644 --- a/src/regress/usr.bin/openssl/testenc.sh +++ b/src/regress/usr.bin/openssl/testenc.sh | |||
@@ -1,9 +1,9 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: testenc.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # $OpenBSD: testenc.sh,v 1.2 2018/02/06 02:31:13 tb Exp $ |
3 | 3 | ||
4 | testsrc=$2/openssl.cnf | 4 | testsrc=$2/openssl.cnf |
5 | test=$1/p | 5 | test=$1/p |
6 | cmd=/usr/bin/openssl | 6 | cmd=${OPENSSL:-/usr/bin/openssl} |
7 | 7 | ||
8 | cd $1 | 8 | cd $1 |
9 | 9 | ||
diff --git a/src/regress/usr.bin/openssl/testrsa.sh b/src/regress/usr.bin/openssl/testrsa.sh index a9a00f295e..36f5e639e8 100644 --- a/src/regress/usr.bin/openssl/testrsa.sh +++ b/src/regress/usr.bin/openssl/testrsa.sh | |||
@@ -1,27 +1,28 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: testrsa.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # $OpenBSD: testrsa.sh,v 1.2 2018/02/06 02:31:13 tb Exp $ |
3 | 3 | ||
4 | 4 | ||
5 | #Test RSA certificate generation of openssl | 5 | #Test RSA certificate generation of openssl |
6 | 6 | ||
7 | cd $1 | 7 | cd $1 |
8 | openssl_bin=${OPENSSL:-/usr/bin/openssl} | ||
8 | 9 | ||
9 | # Generate RSA private key | 10 | # Generate RSA private key |
10 | openssl genrsa -out rsakey.pem | 11 | $openssl_bin genrsa -out rsakey.pem |
11 | if [ $? != 0 ]; then | 12 | if [ $? != 0 ]; then |
12 | exit 1; | 13 | exit 1; |
13 | fi | 14 | fi |
14 | 15 | ||
15 | 16 | ||
16 | # Generate an RSA certificate | 17 | # Generate an RSA certificate |
17 | openssl req -config $2/openssl.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem | 18 | $openssl_bin req -config $2/openssl.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem |
18 | if [ $? != 0 ]; then | 19 | if [ $? != 0 ]; then |
19 | exit 1; | 20 | exit 1; |
20 | fi | 21 | fi |
21 | 22 | ||
22 | 23 | ||
23 | # Now check the certificate | 24 | # Now check the certificate |
24 | openssl x509 -text -in rsacert.pem | 25 | $openssl_bin x509 -text -in rsacert.pem |
25 | if [ $? != 0 ]; then | 26 | if [ $? != 0 ]; then |
26 | exit 1; | 27 | exit 1; |
27 | fi | 28 | fi |