diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | regress/Makefile | 5 | ||||
-rw-r--r-- | regress/brokenkeys.sh | 23 |
3 files changed, 30 insertions, 3 deletions
@@ -35,6 +35,9 @@ | |||
35 | - djm@cvs.openbsd.org 2004/10/08 02:01:50 | 35 | - djm@cvs.openbsd.org 2004/10/08 02:01:50 |
36 | [reexec.sh] | 36 | [reexec.sh] |
37 | shrink and tidy; ok dtucker@ | 37 | shrink and tidy; ok dtucker@ |
38 | - djm@cvs.openbsd.org 2004/10/29 23:59:22 | ||
39 | [Makefile added brokenkeys.sh] | ||
40 | regression test for handling of corrupt keys in authorized_keys file | ||
38 | 41 | ||
39 | 20041203 | 42 | 20041203 |
40 | - (dtucker) OpenBSD CVS Sync | 43 | - (dtucker) OpenBSD CVS Sync |
@@ -1908,4 +1911,4 @@ | |||
1908 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 1911 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
1909 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 1912 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
1910 | 1913 | ||
1911 | $Id: ChangeLog,v 1.3594 2004/12/06 12:05:52 dtucker Exp $ | 1914 | $Id: ChangeLog,v 1.3595 2004/12/06 12:07:37 dtucker Exp $ |
diff --git a/regress/Makefile b/regress/Makefile index dc7b6e35a..3e22d547f 100644 --- a/regress/Makefile +++ b/regress/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.32 2004/07/09 19:45:43 david Exp $ | 1 | # $OpenBSD: Makefile,v 1.33 2004/10/29 23:59:22 djm Exp $ |
2 | 2 | ||
3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec | 3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec |
4 | tests: $(REGRESS_TARGETS) | 4 | tests: $(REGRESS_TARGETS) |
@@ -38,7 +38,8 @@ LTESTS= connect \ | |||
38 | dynamic-forward \ | 38 | dynamic-forward \ |
39 | forwarding \ | 39 | forwarding \ |
40 | multiplex \ | 40 | multiplex \ |
41 | reexec | 41 | reexec \ |
42 | brokenkeys | ||
42 | 43 | ||
43 | USER!= id -un | 44 | USER!= id -un |
44 | CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ | 45 | CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ |
diff --git a/regress/brokenkeys.sh b/regress/brokenkeys.sh new file mode 100644 index 000000000..3e70c348a --- /dev/null +++ b/regress/brokenkeys.sh | |||
@@ -0,0 +1,23 @@ | |||
1 | # $OpenBSD: brokenkeys.sh,v 1.1 2004/10/29 23:59:22 djm Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="broken keys" | ||
5 | |||
6 | KEYS="$OBJ/authorized_keys_${USER}" | ||
7 | |||
8 | start_sshd | ||
9 | |||
10 | mv ${KEYS} ${KEYS}.bak | ||
11 | |||
12 | # Truncated key | ||
13 | echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEABTM= bad key" > $KEYS | ||
14 | cat ${KEYS}.bak >> ${KEYS} | ||
15 | cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER | ||
16 | |||
17 | ${SSH} -2 -F $OBJ/ssh_config somehost true | ||
18 | if [ $? -ne 0 ]; then | ||
19 | fail "ssh connect with protocol $p failed" | ||
20 | fi | ||
21 | |||
22 | mv ${KEYS}.bak ${KEYS} | ||
23 | |||