diff options
author | Damien Miller <djm@mindrot.org> | 2008-03-12 14:17:00 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-03-12 14:17:00 +0100 |
commit | af78493bba42cd4351eded064fb63b81fa2867a9 (patch) | |
tree | 0eca81431c4b72d3cc1a6f3119a95ad7ffa82fa8 /regress/test-exec.sh | |
parent | - djm@cvs.openbsd.org 2007/12/12 05:04:03 (diff) | |
download | openssh-af78493bba42cd4351eded064fb63b81fa2867a9.tar.xz openssh-af78493bba42cd4351eded064fb63b81fa2867a9.zip |
- djm@cvs.openbsd.org 2007/12/21 04:13:53
[regress/Makefile regress/test-exec.sh regress/putty-ciphers.sh]
[regress/putty-kex.sh regress/putty-transfer.sh regress/ssh2putty.sh]
basic (crypto, kex and transfer) interop regression tests against putty
To run these, install putty and run "make interop-tests" from the build
directory - the tests aren't run by default yet.
Diffstat (limited to '')
-rw-r--r-- | regress/test-exec.sh | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index e44778065..1eb9ff729 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.30 2007/10/26 05:30:01 djm Exp $ +# $OpenBSD: test-exec.sh,v 1.31 2007/12/21 04:13:53 djm Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -69,6 +69,10 @@ SFTP=sftp SFTPSERVER=/usr/libexec/openssh/sftp-server SCP=scp +# Interop testing +PLINK=/usr/local/bin/plink +PUTTYGEN=/usr/local/bin/puttygen + if [ "x$TEST_SSH_SSH" != "x" ]; then SSH="${TEST_SSH_SSH}" fi @@ -96,6 +100,12 @@ fi if [ "x$TEST_SSH_SCP" != "x" ]; then SCP="${TEST_SSH_SCP}" fi +if [ "x$TEST_SSH_PLINK" != "x" ]; then + PLINK="${TEST_SSH_PLINK}" +fi +if [ "x$TEST_SSH_PUTTYGEN" != "x" ]; then + PUTTYGEN="${TEST_SSH_PUTTYGEN}" +fi # Path to sshd must be absolute for rexec case "$SSHD" in @@ -269,6 +279,34 @@ for t in rsa rsa1; do done chmod 644 $OBJ/authorized_keys_$USER +# If PuTTY is present, prepare keys and configuration +REGRESS_INTEROP_PUTTY=no +if test -x $PUTTYGEN -a -x $PLINK ; then + mkdir -p ${OBJ}/.putty + + # Add a PuTTY key to authorized_keys + rm -f ${OBJ}/putty.rsa2 + puttygen -t rsa -o ${OBJ}/putty.rsa2 < /dev/null > /dev/null + puttygen -O public-openssh ${OBJ}/putty.rsa2 \ + >> $OBJ/authorized_keys_$USER + + # Convert rsa2 host key to PuTTY format + ${SRC}/ssh2putty.sh 127.0.0.1 $PORT $OBJ/rsa > \ + ${OBJ}/.putty/sshhostkeys + ${SRC}/ssh2putty.sh 127.0.0.1 22 $OBJ/rsa >> \ + ${OBJ}/.putty/sshhostkeys + + # Setup proxied session + mkdir -p ${OBJ}/.putty/sessions + rm -f ${OBJ}/.putty/sessions/localhost_proxy + echo "Hostname=127.0.0.1" >> ${OBJ}/.putty/sessions/localhost_proxy + echo "PortNumber=$PORT" >> ${OBJ}/.putty/sessions/localhost_proxy + echo "ProxyMethod=5" >> ${OBJ}/.putty/sessions/localhost_proxy + echo "ProxyTelnetCommand=sh ${SRC}/sshd-log-wrapper.sh ${SSHD} ${TEST_SSH_LOGFILE} -i -f $OBJ/sshd_proxy" >> ${OBJ}/.putty/sessions/localhost_proxy + + REGRESS_INTEROP_PUTTY=yes +fi + # create a proxy version of the client config ( cat $OBJ/ssh_config @@ -281,8 +319,8 @@ ${SSHD} -t -f $OBJ/sshd_proxy || fatal "sshd_proxy broken" start_sshd () { # start sshd - $SUDO ${SSHD} -f $OBJ/sshd_config -t || fatal "sshd_config broken" - $SUDO ${SSHD} -f $OBJ/sshd_config -e >>$TEST_SSH_LOGFILE 2>&1 + $SUDO ${SSHD} -f $OBJ/sshd_config "$@" -t || fatal "sshd_config broken" + $SUDO ${SSHD} -f $OBJ/sshd_config -e "$@" >>$TEST_SSH_LOGFILE 2>&1 trace "wait for sshd" i=0; |