upstream: When OpenSSL is not available, skip parts of percent test
that require it. Based on github pr#368 from ren mingshuai. OpenBSD-Regress-ID: 49a375b2cf61ccb95b52e75e2e025cd10988ebb2
This commit is contained in:
parent
1cd2aac312
commit
d77fc611a6
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: percent.sh,v 1.14 2022/02/20 03:47:26 dtucker Exp $
|
# $OpenBSD: percent.sh,v 1.15 2023/01/06 12:33:33 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="percent expansions"
|
tid="percent expansions"
|
||||||
|
@ -79,10 +79,12 @@ for i in matchexec localcommand remotecommand controlpath identityagent \
|
||||||
trial $i '%T' NONE
|
trial $i '%T' NONE
|
||||||
fi
|
fi
|
||||||
# Matches implementation in readconf.c:ssh_connection_hash()
|
# Matches implementation in readconf.c:ssh_connection_hash()
|
||||||
|
if [ ! -z "${OPENSSL_BIN}" ]; then
|
||||||
HASH=`printf "${HOSTNAME}127.0.0.1${PORT}$REMUSER" |
|
HASH=`printf "${HOSTNAME}127.0.0.1${PORT}$REMUSER" |
|
||||||
$OPENSSL_BIN sha1 | cut -f2 -d' '`
|
$OPENSSL_BIN sha1 | cut -f2 -d' '`
|
||||||
trial $i '%%' '%'
|
|
||||||
trial $i '%C' $HASH
|
trial $i '%C' $HASH
|
||||||
|
fi
|
||||||
|
trial $i '%%' '%'
|
||||||
trial $i '%i' $USERID
|
trial $i '%i' $USERID
|
||||||
trial $i '%h' 127.0.0.1
|
trial $i '%h' 127.0.0.1
|
||||||
trial $i '%L' $HOST
|
trial $i '%L' $HOST
|
||||||
|
@ -96,9 +98,11 @@ for i in matchexec localcommand remotecommand controlpath identityagent \
|
||||||
# containing %d for UserKnownHostsFile
|
# containing %d for UserKnownHostsFile
|
||||||
if [ "$i" != "userknownhostsfile" ]; then
|
if [ "$i" != "userknownhostsfile" ]; then
|
||||||
trial $i '%d' $HOME
|
trial $i '%d' $HOME
|
||||||
|
if [ ! -z "${HASH}" ]; then
|
||||||
trial $i '%%/%C/%i/%h/%d/%L/%l/%n/%p/%r/%u' \
|
trial $i '%%/%C/%i/%h/%d/%L/%l/%n/%p/%r/%u' \
|
||||||
"%/$HASH/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER"
|
"%/$HASH/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Subset of above since we don't expand shell-style variables on anything that
|
# Subset of above since we don't expand shell-style variables on anything that
|
||||||
|
|
Loading…
Reference in New Issue