diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-15 13:08:57 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-15 13:08:57 +0000 |
commit | 97569307e000e086fd6cf20aeaa2dfa10dc5c67d (patch) | |
tree | 7558e4bd541518153fc7db49c5234b6e96d2cdf4 /regress/usr.bin/ssh/agent.sh | |
parent | 841669506a0a2a64f4ab24abde38d5547a842918 (diff) |
allow specification of binary-under-test with
$TEST_SSH_{SSH,SSHD,SSHAGENT,SSHADD,SSHKEYGEN,SSHKEYSCAN}
Diffstat (limited to 'regress/usr.bin/ssh/agent.sh')
-rw-r--r-- | regress/usr.bin/ssh/agent.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/regress/usr.bin/ssh/agent.sh b/regress/usr.bin/ssh/agent.sh index 64623c0064d..7e9b4cb1870 100644 --- a/regress/usr.bin/ssh/agent.sh +++ b/regress/usr.bin/ssh/agent.sh @@ -1,20 +1,20 @@ -# $OpenBSD: agent.sh,v 1.5 2002/02/17 22:22:45 markus Exp $ +# $OpenBSD: agent.sh,v 1.6 2002/03/15 13:08:56 markus Exp $ # Placed in the Public Domain. tid="simple agent test" -SSH_AUTH_SOCK=/nonexistant ssh-add -l > /dev/null 2>&1 +SSH_AUTH_SOCK=/nonexistant ${SSHADD} -l > /dev/null 2>&1 if [ $? -ne 2 ]; then fail "ssh-add -l did not fail with exit code 2" fi trace "start agent" -eval `ssh-agent -s` > /dev/null +eval `${SSHAGENT} -s` > /dev/null r=$? if [ $r -ne 0 ]; then fail "could not start ssh-agent: exit code $r" else - ssh-add -l > /dev/null 2>&1 + ${SSHADD} -l > /dev/null 2>&1 if [ $? -ne 1 ]; then fail "ssh-add -l did not fail with exit code 1" fi @@ -23,29 +23,29 @@ else for t in rsa rsa1; do # generate user key for agent rm -f $OBJ/$t-agent - ssh-keygen -q -N '' -t $t -f $OBJ/$t-agent ||\ + ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t-agent ||\ fail "ssh-keygen for $t-agent failed" # add to authorized keys cat $OBJ/$t-agent.pub >> $OBJ/authorized_keys_$USER # add privat key to agent - ssh-add $OBJ/$t-agent > /dev/null 2>&1 + ${SSHADD} $OBJ/$t-agent > /dev/null 2>&1 if [ $? -ne 0 ]; then fail "ssh-add did succeed exit code 0" fi done - ssh-add -l > /dev/null 2>&1 + ${SSHADD} -l > /dev/null 2>&1 if [ $? -ne 0 ]; then fail "ssh-add -l failed: exit code $?" fi # the same for full pubkey output - ssh-add -L > /dev/null 2>&1 + ${SSHADD} -L > /dev/null 2>&1 if [ $? -ne 0 ]; then fail "ssh-add -L failed: exit code $?" fi trace "simple connect via agent" for p in 1 2; do - ssh -$p -F $OBJ/ssh_proxy somehost exit 5$p + ${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p if [ $? -ne 5$p ]; then fail "ssh connect with protocol $p failed (exit code $?)" fi @@ -53,23 +53,23 @@ else trace "agent forwarding" for p in 1 2; do - ssh -A -$p -F $OBJ/ssh_proxy somehost ssh-add -l > /dev/null 2>&1 + ${SSH} -A -$p -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1 if [ $? -ne 0 ]; then fail "ssh-add -l via agent fwd proto $p failed (exit code $?)" fi - ssh -A -$p -F $OBJ/ssh_proxy somehost \ - "ssh -$p -F $OBJ/ssh_proxy somehost exit 5$p" + ${SSH} -A -$p -F $OBJ/ssh_proxy somehost \ + "${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p" if [ $? -ne 5$p ]; then fail "agent fwd proto $p failed (exit code $?)" fi done trace "delete all agent keys" - ssh-add -D > /dev/null 2>&1 + ${SSHADD} -D > /dev/null 2>&1 if [ $? -ne 0 ]; then fail "ssh-add -D failed: exit code $?" fi trace "kill agent" - ssh-agent -k > /dev/null + ${SSHAGENT} -k > /dev/null fi |