xref: /openbsd/regress/usr.bin/ssh/Makefile (revision 7b36286a)
1#	$OpenBSD: Makefile,v 1.48 2008/06/28 13:57:25 djm Exp $
2
3REGRESS_TARGETS=	t1 t2 t3 t4 t5 t6 t7
4
5CLEANFILES+=	t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2
6
7LTESTS= 	connect \
8		proxy-connect \
9		connect-privsep \
10		proto-version \
11		proto-mismatch \
12		exit-status \
13		envpass \
14		transfer \
15		banner \
16		rekey \
17		stderr-data \
18		stderr-after-eof \
19		broken-pipe \
20		try-ciphers \
21		yes-head \
22		login-timeout \
23		agent \
24		agent-getpeereid \
25		agent-timeout \
26		agent-ptrace \
27		keyscan \
28		keygen-change \
29		key-options \
30		scp \
31		sftp \
32		sftp-cmds \
33		sftp-badcmds \
34		sftp-batch \
35		sftp-glob \
36		reconfigure \
37		dynamic-forward \
38		forwarding \
39		multiplex \
40		reexec \
41		brokenkeys \
42		cfgmatch \
43		addrmatch \
44		localcommand \
45		forcecommand
46
47INTEROP_TESTS=	putty-transfer putty-ciphers putty-kex conch-ciphers
48#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
49
50
51USER!=		id -un
52CLEANFILES+=	authorized_keys_${USER} known_hosts pidfile \
53		ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \
54		rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
55		rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
56		ls.copy banner.in banner.out empty.in \
57		scp-ssh-wrapper.exe ssh_proxy_envpass remote_pid \
58		sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv
59
60t1:
61	ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
62	tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv
63	ssh-keygen -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv
64	awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv
65	ssh-keygen -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv
66
67t2:
68	cat ${.CURDIR}/rsa_openssh.prv > t2.out
69	chmod 600 t2.out
70	ssh-keygen -yf t2.out | diff - ${.CURDIR}/rsa_openssh.pub
71
72t3:
73	ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub |\
74		ssh-keygen -if /dev/stdin |\
75		diff - ${.CURDIR}/rsa_openssh.pub
76
77t4:
78	ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\
79		awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
80
81t5:
82	ssh-keygen -Bf ${.CURDIR}/rsa_openssh.pub |\
83		awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
84
85t6:
86	ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > t6.out1
87	ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > t6.out2
88	chmod 600 t6.out1
89	ssh-keygen -yf t6.out1 | diff - t6.out2
90
91t7.out:
92	ssh-keygen -q -t rsa -N '' -f $@
93
94t7: t7.out
95	ssh-keygen -lf t7.out > /dev/null
96	ssh-keygen -Bf t7.out > /dev/null
97
98.for t in ${LTESTS} ${INTEROP_TESTS}
99t-${t}:
100	env SUDO=${SUDO} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/${t}.sh
101.endfor
102
103.for t in ${LTESTS}
104REGRESS_TARGETS+=t-${t}
105.endfor
106
107.for t in ${INTEROP_TESTS}
108INTEROP_TARGETS+=t-${t}
109.endfor
110
111# Not run by default
112interop: ${INTEROP_TARGETS}
113
114clean:
115	rm -f ${CLEANFILES}
116	rm -rf .putty
117
118.include <bsd.regress.mk>
119