diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/Makefile | 3 | ||||
-rw-r--r-- | regress/agent-ptrace.sh | 2 | ||||
-rw-r--r-- | regress/agent.sh | 2 | ||||
-rw-r--r-- | regress/cert-hostkey.sh | 2 | ||||
-rw-r--r-- | regress/dhgex.sh | 54 | ||||
-rw-r--r-- | regress/host-expand.sh | 1 | ||||
-rw-r--r-- | regress/login-timeout.sh | 4 | ||||
-rw-r--r-- | regress/scp-ssh-wrapper.sh | 2 | ||||
-rw-r--r-- | regress/scp.sh | 2 | ||||
-rw-r--r-- | regress/setuid-allowed.c | 1 | ||||
-rw-r--r-- | regress/sftp-chroot.sh | 5 |
11 files changed, 69 insertions, 9 deletions
diff --git a/regress/Makefile b/regress/Makefile index 0c66b1774..6e3b8d634 100644 --- a/regress/Makefile +++ b/regress/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.67 2013/12/06 13:52:46 markus Exp $ | 1 | # $OpenBSD: Makefile,v 1.68 2014/01/25 04:35:32 dtucker Exp $ |
2 | 2 | ||
3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t-exec | 3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t-exec |
4 | tests: $(REGRESS_TARGETS) | 4 | tests: $(REGRESS_TARGETS) |
@@ -65,6 +65,7 @@ LTESTS= connect \ | |||
65 | forward-control \ | 65 | forward-control \ |
66 | integrity \ | 66 | integrity \ |
67 | krl | 67 | krl |
68 | # dhgex \ | ||
68 | 69 | ||
69 | INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers | 70 | INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers |
70 | #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp | 71 | #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp |
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh index ae150641f..1912ca8f9 100644 --- a/regress/agent-ptrace.sh +++ b/regress/agent-ptrace.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: agent-ptrace.sh,v 1.1 2002/12/09 15:38:30 markus Exp $ | 1 | # $OpenBSD: agent-ptrace.sh,v 1.2 2014/02/27 21:21:25 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="disallow agent ptrace attach" | 4 | tid="disallow agent ptrace attach" |
diff --git a/regress/agent.sh b/regress/agent.sh index cf1a45fe0..caad3c88e 100644 --- a/regress/agent.sh +++ b/regress/agent.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: agent.sh,v 1.9 2013/12/06 13:52:46 markus Exp $ | 1 | # $OpenBSD: agent.sh,v 1.10 2014/02/27 21:21:25 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="simple agent test" | 4 | tid="simple agent test" |
diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh index a1318cd53..1d9e0ed8e 100644 --- a/regress/cert-hostkey.sh +++ b/regress/cert-hostkey.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: cert-hostkey.sh,v 1.8 2013/12/06 13:52:46 markus Exp $ | 1 | # $OpenBSD: cert-hostkey.sh,v 1.9 2014/01/26 10:22:10 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="certified host keys" | 4 | tid="certified host keys" |
diff --git a/regress/dhgex.sh b/regress/dhgex.sh new file mode 100644 index 000000000..4c1a3d83c --- /dev/null +++ b/regress/dhgex.sh | |||
@@ -0,0 +1,54 @@ | |||
1 | # $OpenBSD: dhgex.sh,v 1.1 2014/01/25 04:35:32 dtucker Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="dhgex" | ||
5 | |||
6 | LOG=${TEST_SSH_LOGFILE} | ||
7 | rm -f ${LOG} | ||
8 | |||
9 | kexs=`${SSH} -Q kex | grep diffie-hellman-group-exchange` | ||
10 | |||
11 | ssh_test_dhgex() | ||
12 | { | ||
13 | bits="$1"; shift | ||
14 | cipher="$1"; shift | ||
15 | kex="$1"; shift | ||
16 | |||
17 | rm -f ${LOG} | ||
18 | opts="-oKexAlgorithms=$kex -oCiphers=$cipher" | ||
19 | groupsz="1024<$bits<8192" | ||
20 | verbose "$tid bits $bits $kex $cipher" | ||
21 | ${SSH} ${opts} $@ -vvv -F ${OBJ}/ssh_proxy somehost true | ||
22 | if [ $? -ne 0 ]; then | ||
23 | fail "ssh failed ($@)" | ||
24 | fi | ||
25 | # check what we request | ||
26 | grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null | ||
27 | if [ $? != 0 ]; then | ||
28 | got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}` | ||
29 | fail "$tid unexpected GEX sizes, expected $groupsz, got $got" | ||
30 | fi | ||
31 | # check what we got (depends on contents of system moduli file) | ||
32 | gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`" | ||
33 | if [ "$gotbits" -lt "$bits" ]; then | ||
34 | fatal "$tid expected $bits bit group, got $gotbits" | ||
35 | fi | ||
36 | } | ||
37 | |||
38 | check() | ||
39 | { | ||
40 | bits="$1"; shift | ||
41 | |||
42 | for c in $@; do | ||
43 | for k in $kexs; do | ||
44 | ssh_test_dhgex $bits $c $k | ||
45 | done | ||
46 | done | ||
47 | } | ||
48 | |||
49 | #check 2048 3des-cbc | ||
50 | check 3072 `${SSH} -Q cipher | grep 128` | ||
51 | check 3072 arcfour blowfish-cbc | ||
52 | check 7680 `${SSH} -Q cipher | grep 192` | ||
53 | check 8192 `${SSH} -Q cipher | grep 256` | ||
54 | check 8192 rijndael-cbc@lysator.liu.se chacha20-poly1305@openssh.com | ||
diff --git a/regress/host-expand.sh b/regress/host-expand.sh index a0188363d..6cc0e6055 100644 --- a/regress/host-expand.sh +++ b/regress/host-expand.sh | |||
@@ -1,3 +1,4 @@ | |||
1 | # $OpenBSD: host-expand.sh,v 1.3 2014/02/27 23:17:41 djm Exp $ | ||
1 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
2 | 3 | ||
3 | tid="expand %h and %n" | 4 | tid="expand %h and %n" |
diff --git a/regress/login-timeout.sh b/regress/login-timeout.sh index d73923b9c..d9b48f391 100644 --- a/regress/login-timeout.sh +++ b/regress/login-timeout.sh | |||
@@ -1,9 +1,11 @@ | |||
1 | # $OpenBSD: login-timeout.sh,v 1.5 2013/05/17 10:23:52 dtucker Exp $ | 1 | # $OpenBSD: login-timeout.sh,v 1.6 2014/02/27 20:04:16 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="connect after login grace timeout" | 4 | tid="connect after login grace timeout" |
5 | 5 | ||
6 | trace "test login grace with privsep" | 6 | trace "test login grace with privsep" |
7 | cp $OBJ/sshd_config $OBJ/sshd_config.orig | ||
8 | grep -vi LoginGraceTime $OBJ/sshd_config.orig > $OBJ/sshd_config | ||
7 | echo "LoginGraceTime 10s" >> $OBJ/sshd_config | 9 | echo "LoginGraceTime 10s" >> $OBJ/sshd_config |
8 | echo "MaxStartups 1" >> $OBJ/sshd_config | 10 | echo "MaxStartups 1" >> $OBJ/sshd_config |
9 | start_sshd | 11 | start_sshd |
diff --git a/regress/scp-ssh-wrapper.sh b/regress/scp-ssh-wrapper.sh index c63bc2bc1..59f1ff63e 100644 --- a/regress/scp-ssh-wrapper.sh +++ b/regress/scp-ssh-wrapper.sh | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: scp-ssh-wrapper.sh,v 1.2 2005/12/14 04:36:39 dtucker Exp $ | 2 | # $OpenBSD: scp-ssh-wrapper.sh,v 1.3 2014/01/26 10:49:17 djm Exp $ |
3 | # Placed in the Public Domain. | 3 | # Placed in the Public Domain. |
4 | 4 | ||
5 | printname () { | 5 | printname () { |
diff --git a/regress/scp.sh b/regress/scp.sh index c2da2a862..57cc77066 100644 --- a/regress/scp.sh +++ b/regress/scp.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: scp.sh,v 1.9 2013/05/17 10:35:43 dtucker Exp $ | 1 | # $OpenBSD: scp.sh,v 1.10 2014/01/26 10:49:17 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="scp" | 4 | tid="scp" |
diff --git a/regress/setuid-allowed.c b/regress/setuid-allowed.c index 37b7dc8ad..676d2661c 100644 --- a/regress/setuid-allowed.c +++ b/regress/setuid-allowed.c | |||
@@ -23,6 +23,7 @@ | |||
23 | # include <sys/statvfs.h> | 23 | # include <sys/statvfs.h> |
24 | #endif | 24 | #endif |
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | #include <string.h> | ||
26 | #include <errno.h> | 27 | #include <errno.h> |
27 | 28 | ||
28 | void | 29 | void |
diff --git a/regress/sftp-chroot.sh b/regress/sftp-chroot.sh index 03b9bc6d7..23f7456e8 100644 --- a/regress/sftp-chroot.sh +++ b/regress/sftp-chroot.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: sftp-chroot.sh,v 1.2 2013/05/17 04:29:14 dtucker Exp $ | 1 | # $OpenBSD: sftp-chroot.sh,v 1.4 2014/01/20 00:00:30 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="sftp in chroot" | 4 | tid="sftp in chroot" |
@@ -18,7 +18,8 @@ $SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \ | |||
18 | start_sshd -oChrootDirectory=$CHROOT -oForceCommand="internal-sftp -d /" | 18 | start_sshd -oChrootDirectory=$CHROOT -oForceCommand="internal-sftp -d /" |
19 | 19 | ||
20 | verbose "test $tid: get" | 20 | verbose "test $tid: get" |
21 | ${SFTP} -qS "$SSH" -F $OBJ/ssh_config host:/${FILENAME} $COPY || \ | 21 | ${SFTP} -S "$SSH" -F $OBJ/ssh_config host:/${FILENAME} $COPY \ |
22 | >>$TEST_REGRESS_LOGFILE 2>&1 || \ | ||
22 | fatal "Fetch ${FILENAME} failed" | 23 | fatal "Fetch ${FILENAME} failed" |
23 | cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ" | 24 | cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ" |
24 | 25 | ||