summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2021-07-25 12:13:04 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2021-07-25 12:13:04 +0000
commit50983c20bfd966a547a2581ba8209ee6ee0289f4 (patch)
treee7a3a327911ceadaf73b01151a5f821638f181b4 /regress/usr.bin
parenteb1d1d0c2678a900db50a931ce71557d8a8d6e98 (diff)
Replace OPENSSL as the variable that points to the openssl binary
with OPENSSL_BIN. This will allow us to use the OPENSSL variable from mk.conf or the make(1) command line indicating if we're building with our without OpenSSL, and ultimately get the regress tests working in the OPENSSL=no configuration.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/ssh/agent-pkcs11.sh12
-rw-r--r--regress/usr.bin/ssh/percent.sh4
-rwxr-xr-xregress/usr.bin/ssh/ssh2putty.sh8
-rw-r--r--regress/usr.bin/ssh/test-exec.sh6
4 files changed, 15 insertions, 15 deletions
diff --git a/regress/usr.bin/ssh/agent-pkcs11.sh b/regress/usr.bin/ssh/agent-pkcs11.sh
index 7ade203a112..91674c3a686 100644
--- a/regress/usr.bin/ssh/agent-pkcs11.sh
+++ b/regress/usr.bin/ssh/agent-pkcs11.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: agent-pkcs11.sh,v 1.8 2021/05/24 10:25:18 dtucker Exp $
+# $OpenBSD: agent-pkcs11.sh,v 1.9 2021/07/25 12:13:03 dtucker Exp $
# Placed in the Public Domain.
tid="pkcs11 agent test"
@@ -46,16 +46,16 @@ notty() {
trace "generating keys"
RSA=${DIR}/RSA
EC=${DIR}/EC
-$OPENSSL genpkey -algorithm rsa > $RSA
-$OPENSSL pkcs8 -nocrypt -in $RSA |\
+$OPENSSL_BIN genpkey -algorithm rsa > $RSA
+$OPENSSL_BIN pkcs8 -nocrypt -in $RSA |\
softhsm2-util --slot "$slot" --label 01 --id 01 --pin "$TEST_SSH_PIN" --import /dev/stdin
-$OPENSSL genpkey \
+$OPENSSL_BIN genpkey \
-genparam \
-algorithm ec \
-pkeyopt ec_paramgen_curve:prime256v1 |\
- $OPENSSL genpkey \
+ $OPENSSL_BIN genpkey \
-paramfile /dev/stdin > $EC
-$OPENSSL pkcs8 -nocrypt -in $EC |\
+$OPENSSL_BIN pkcs8 -nocrypt -in $EC |\
softhsm2-util --slot "$slot" --label 02 --id 02 --pin "$TEST_SSH_PIN" --import /dev/stdin
trace "start agent"
diff --git a/regress/usr.bin/ssh/percent.sh b/regress/usr.bin/ssh/percent.sh
index 38e9b4d7730..339b6272282 100644
--- a/regress/usr.bin/ssh/percent.sh
+++ b/regress/usr.bin/ssh/percent.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: percent.sh,v 1.12 2021/05/24 10:25:18 dtucker Exp $
+# $OpenBSD: percent.sh,v 1.13 2021/07/25 12:13:03 dtucker Exp $
# Placed in the Public Domain.
tid="percent expansions"
@@ -74,7 +74,7 @@ for i in matchexec localcommand remotecommand controlpath identityagent \
fi
# Matches implementation in readconf.c:ssh_connection_hash()
HASH=`printf "${HOSTNAME}127.0.0.1${PORT}$REMUSER" |
- $OPENSSL sha1 | cut -f2 -d' '`
+ $OPENSSL_BIN sha1 | cut -f2 -d' '`
trial $i '%%' '%'
trial $i '%C' $HASH
trial $i '%i' $USERID
diff --git a/regress/usr.bin/ssh/ssh2putty.sh b/regress/usr.bin/ssh/ssh2putty.sh
index 7fcb3f0bfce..9b08310391c 100755
--- a/regress/usr.bin/ssh/ssh2putty.sh
+++ b/regress/usr.bin/ssh/ssh2putty.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: ssh2putty.sh,v 1.8 2021/06/02 00:17:45 dtucker Exp $
+# $OpenBSD: ssh2putty.sh,v 1.9 2021/07/25 12:13:03 dtucker Exp $
if test "x$1" = "x" -o "x$2" = "x" -o "x$3" = "x" ; then
echo "Usage: ssh2putty hostname port ssh-private-key"
@@ -10,7 +10,7 @@ HOST=$1
PORT=$2
KEYFILE=$3
-OPENSSL="${OPENSSL:-openssl}"
+OPENSSL_BIN="${OPENSSL_BIN:-openssl}"
# XXX - support DSA keys too
if grep "BEGIN RSA PRIVATE KEY" $KEYFILE >/dev/null 2>&1 ; then
@@ -21,13 +21,13 @@ else
fi
public_exponent=`
- $OPENSSL rsa -noout -text -in $KEYFILE | grep ^publicExponent |
+ $OPENSSL_BIN rsa -noout -text -in $KEYFILE | grep ^publicExponent |
sed 's/.*(//;s/).*//'
`
test $? -ne 0 && exit 1
modulus=`
- $OPENSSL rsa -noout -modulus -in $KEYFILE | grep ^Modulus= |
+ $OPENSSL_BIN rsa -noout -modulus -in $KEYFILE | grep ^Modulus= |
sed 's/^Modulus=/0x/' | tr A-Z a-z
`
test $? -ne 0 && exit 1
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh
index 5624247eecc..a2e38ee6d55 100644
--- a/regress/usr.bin/ssh/test-exec.sh
+++ b/regress/usr.bin/ssh/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.82 2021/06/10 09:37:59 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.83 2021/07/25 12:13:03 dtucker Exp $
# Placed in the Public Domain.
USER=`id -un`
@@ -60,7 +60,7 @@ CONCH=/usr/local/bin/conch
# Tools used by multiple tests
NC=nc
-OPENSSL="${OPENSSL:-openssl}"
+OPENSSL_BIN="${OPENSSL_BIN:-openssl}"
if [ "x$TEST_SSH_SSH" != "x" ]; then
SSH="${TEST_SSH_SSH}"
@@ -105,7 +105,7 @@ if [ "x$TEST_SSH_SK_HELPER" != "x" ]; then
SSH_SK_HELPER="${TEST_SSH_SK_HELPER}"
fi
if [ "x$TEST_SSH_OPENSSL" != "x" ]; then
- OPENSSL="${TEST_SSH_OPENSSL}"
+ OPENSSL_BIN="${TEST_SSH_OPENSSL}"
fi
# Path to sshd must be absolute for rexec