summaryrefslogtreecommitdiff
path: root/src/regress/usr.bin/openssl/testrsa.sh
diff options
context:
space:
mode:
authortb <>2018-02-06 02:31:13 +0000
committertb <>2018-02-06 02:31:13 +0000
commit62b0484ba95148b34b734bb8b8136f4a9fb2b354 (patch)
tree8675a4ce7a9109c1ab817db6cc8483f4fde92fcb /src/regress/usr.bin/openssl/testrsa.sh
parenteed7b47cd31e11f242f5c2e2d21582f1b4df0077 (diff)
downloadopenbsd-62b0484ba95148b34b734bb8b8136f4a9fb2b354.tar.gz
openbsd-62b0484ba95148b34b734bb8b8136f4a9fb2b354.tar.bz2
openbsd-62b0484ba95148b34b734bb8b8136f4a9fb2b354.zip
Respect the OPENSSL make variable everywhere so that
make OPENSSL=/usr/src/usr.bin/openssl/obj/openssl actually does the expected thing instead of running a mixture of both the openssl below /usr/obj and the one below /usr/bin. Found the hard way via backtraces that made no sense whatsoever. ok jsing
Diffstat (limited to 'src/regress/usr.bin/openssl/testrsa.sh')
-rw-r--r--src/regress/usr.bin/openssl/testrsa.sh9
1 files changed, 5 insertions, 4 deletions
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
7cd $1 7cd $1
8openssl_bin=${OPENSSL:-/usr/bin/openssl}
8 9
9# Generate RSA private key 10# Generate RSA private key
10openssl genrsa -out rsakey.pem 11$openssl_bin genrsa -out rsakey.pem
11if [ $? != 0 ]; then 12if [ $? != 0 ]; then
12 exit 1; 13 exit 1;
13fi 14fi
14 15
15 16
16# Generate an RSA certificate 17# Generate an RSA certificate
17openssl 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
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 rsacert.pem 25$openssl_bin x509 -text -in rsacert.pem
25if [ $? != 0 ]; then 26if [ $? != 0 ]; then
26 exit 1; 27 exit 1;
27fi 28fi