summaryrefslogtreecommitdiff
path: root/regress/proto-version.sh
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-04-30 23:34:55 +0000
committerDamien Miller <djm@mindrot.org>2017-05-01 11:59:42 +1000
commitdd369320d2435b630a5974ab270d686dcd92d024 (patch)
tree97ae4bb34d835fbafad12180862195a9e9192d28 /regress/proto-version.sh
parent557f921aad004be15805e09fd9572969eb3d9321 (diff)
upstream commit
eliminate explicit specification of protocol in tests and loops over protocol. We only support SSHv2 now. Upstream-Regress-ID: 0082838a9b8a382b7ee9cbf0c1b9db727784fadd
Diffstat (limited to 'regress/proto-version.sh')
-rw-r--r--regress/proto-version.sh14
1 files changed, 4 insertions, 10 deletions
diff --git a/regress/proto-version.sh b/regress/proto-version.sh
index cf4946115..5faeb758c 100644
--- a/regress/proto-version.sh
+++ b/regress/proto-version.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: proto-version.sh,v 1.5 2015/03/03 22:35:19 markus Exp $ 1# $OpenBSD: proto-version.sh,v 1.6 2017/04/30 23:34:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="sshd version with different protocol combinations" 4tid="sshd version with different protocol combinations"
@@ -6,9 +6,8 @@ tid="sshd version with different protocol combinations"
6# we just start sshd in inetd mode and check the banner 6# we just start sshd in inetd mode and check the banner
7check_version () 7check_version ()
8{ 8{
9 version=$1
10 expect=$2 9 expect=$2
11 banner=`printf '' | ${SSHD} -o "Protocol=${version}" -i -f ${OBJ}/sshd_proxy` 10 banner=`printf '' | ${SSHD} -i -f ${OBJ}/sshd_proxy`
12 case ${banner} in 11 case ${banner} in
13 SSH-1.99-*) 12 SSH-1.99-*)
14 proto=199 13 proto=199
@@ -24,13 +23,8 @@ check_version ()
24 ;; 23 ;;
25 esac 24 esac
26 if [ ${expect} -ne ${proto} ]; then 25 if [ ${expect} -ne ${proto} ]; then
27 fail "wrong protocol version ${banner} for ${version}" 26 fail "wrong protocol version ${banner}"
28 fi 27 fi
29} 28}
30 29
31check_version 2 20 30check_version 20
32if ssh_version 1; then
33 check_version 2,1 199
34 check_version 1,2 199
35 check_version 1 15
36fi