2013-05-17 01:31:39 +02:00
|
|
|
# $OpenBSD: Makefile,v 1.64 2013/04/07 02:16:03 dtucker Exp $
|
2002-05-01 05:17:33 +02:00
|
|
|
|
2010-11-05 00:16:34 +01:00
|
|
|
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t-exec
|
2013-02-20 04:01:51 +01:00
|
|
|
tests: $(REGRESS_TARGETS)
|
2002-05-01 05:17:33 +02:00
|
|
|
|
2008-03-12 14:17:00 +01:00
|
|
|
# Interop tests are not run by default
|
2008-03-13 02:05:40 +01:00
|
|
|
interop interop-tests: t-exec-interop
|
2008-03-12 14:17:00 +01:00
|
|
|
|
2003-09-04 07:37:58 +02:00
|
|
|
clean:
|
2003-09-14 03:40:35 +02:00
|
|
|
for F in $(CLEANFILES); do rm -f $(OBJ)$$F; done
|
2008-03-27 07:42:06 +01:00
|
|
|
rm -rf $(OBJ).putty
|
|
|
|
|
2003-09-04 07:37:58 +02:00
|
|
|
distclean: clean
|
2002-05-01 05:17:33 +02:00
|
|
|
|
|
|
|
LTESTS= connect \
|
|
|
|
proxy-connect \
|
|
|
|
connect-privsep \
|
|
|
|
proto-version \
|
|
|
|
proto-mismatch \
|
|
|
|
exit-status \
|
2004-06-16 12:08:56 +02:00
|
|
|
envpass \
|
2002-05-01 05:17:33 +02:00
|
|
|
transfer \
|
2003-10-08 09:47:19 +02:00
|
|
|
banner \
|
2003-06-18 14:32:51 +02:00
|
|
|
rekey \
|
2002-05-01 05:17:33 +02:00
|
|
|
stderr-data \
|
|
|
|
stderr-after-eof \
|
|
|
|
broken-pipe \
|
|
|
|
try-ciphers \
|
|
|
|
yes-head \
|
2004-02-29 10:30:17 +01:00
|
|
|
login-timeout \
|
2002-05-01 05:17:33 +02:00
|
|
|
agent \
|
2003-01-22 07:53:16 +01:00
|
|
|
agent-getpeereid \
|
|
|
|
agent-timeout \
|
|
|
|
agent-ptrace \
|
2002-05-01 05:17:33 +02:00
|
|
|
keyscan \
|
2003-01-22 07:53:16 +01:00
|
|
|
keygen-change \
|
2010-02-24 07:24:56 +01:00
|
|
|
keygen-convert \
|
2008-06-30 00:06:25 +02:00
|
|
|
key-options \
|
2004-06-16 12:15:59 +02:00
|
|
|
scp \
|
2002-05-01 05:17:33 +02:00
|
|
|
sftp \
|
2003-01-22 07:53:16 +01:00
|
|
|
sftp-cmds \
|
2003-06-18 14:35:11 +02:00
|
|
|
sftp-badcmds \
|
2003-01-22 07:53:16 +01:00
|
|
|
sftp-batch \
|
2005-03-07 07:36:18 +01:00
|
|
|
sftp-glob \
|
2003-06-18 14:45:34 +02:00
|
|
|
reconfigure \
|
2003-07-03 12:27:55 +02:00
|
|
|
dynamic-forward \
|
2004-06-16 12:22:22 +02:00
|
|
|
forwarding \
|
2004-06-25 05:45:18 +02:00
|
|
|
multiplex \
|
2004-12-06 13:07:37 +01:00
|
|
|
reexec \
|
2006-07-24 07:31:41 +02:00
|
|
|
brokenkeys \
|
|
|
|
cfgmatch \
|
2008-06-10 15:16:46 +02:00
|
|
|
addrmatch \
|
2008-03-12 13:58:05 +01:00
|
|
|
localcommand \
|
2009-10-07 01:31:56 +02:00
|
|
|
forcecommand \
|
2010-02-26 21:57:12 +01:00
|
|
|
portnum \
|
2010-11-05 08:23:38 +01:00
|
|
|
keytype \
|
|
|
|
kextype \
|
2010-02-26 21:57:12 +01:00
|
|
|
cert-hostkey \
|
2011-01-06 23:54:20 +01:00
|
|
|
cert-userkey \
|
2012-12-03 00:12:13 +01:00
|
|
|
host-expand \
|
2012-12-03 00:13:39 +01:00
|
|
|
keys-command \
|
2012-12-12 00:54:37 +01:00
|
|
|
forward-control \
|
2013-01-18 01:51:56 +01:00
|
|
|
integrity \
|
|
|
|
krl
|
2002-05-01 05:17:33 +02:00
|
|
|
|
2008-06-30 00:07:56 +02:00
|
|
|
INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers
|
2008-03-12 14:17:00 +01:00
|
|
|
#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
|
|
|
|
|
2010-11-05 08:23:38 +01:00
|
|
|
#LTESTS= cipher-speed
|
|
|
|
|
2002-05-01 05:17:33 +02:00
|
|
|
USER!= id -un
|
2011-01-17 00:51:40 +01:00
|
|
|
CLEANFILES= t2.out t3.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
|
2010-11-05 00:16:34 +01:00
|
|
|
t8.out t8.out.pub t9.out t9.out.pub \
|
2013-03-12 01:19:40 +01:00
|
|
|
authorized_keys_${USER} known_hosts pidfile testdata \
|
2004-12-06 13:04:57 +01:00
|
|
|
ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \
|
2002-05-01 05:17:33 +02:00
|
|
|
rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
|
|
|
|
rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
|
2004-06-16 12:15:59 +02:00
|
|
|
ls.copy banner.in banner.out empty.in \
|
2006-07-24 07:31:41 +02:00
|
|
|
scp-ssh-wrapper.scp ssh_proxy_envpass remote_pid \
|
2008-03-27 07:42:06 +01:00
|
|
|
sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \
|
2013-01-18 01:51:56 +01:00
|
|
|
known_hosts-cert host_ca_key* cert_host_key* cert_user_key* \
|
2011-01-17 00:51:40 +01:00
|
|
|
putty.rsa2 sshd_proxy_orig ssh_proxy_bak \
|
|
|
|
key.rsa-* key.dsa-* key.ecdsa-* \
|
2012-12-03 00:13:39 +01:00
|
|
|
authorized_principals_${USER} expect actual ready \
|
2013-05-17 01:19:10 +02:00
|
|
|
sshd_proxy.* authorized_keys_${USER}.* modpipe revoked-* krl-* \
|
2013-05-17 01:31:39 +02:00
|
|
|
ssh.log failed-ssh.log sshd.log failed-sshd.log \
|
|
|
|
regress.log failed-regress.log ssh-log-wrapper.sh
|
2002-05-01 05:17:33 +02:00
|
|
|
|
2010-02-24 07:28:45 +01:00
|
|
|
# Enable all malloc(3) randomisations and checks
|
|
|
|
TEST_ENV= "MALLOC_OPTIONS=AFGJPRX"
|
|
|
|
|
2011-01-17 00:51:40 +01:00
|
|
|
TEST_SSH_SSHKEYGEN?=ssh-keygen
|
|
|
|
|
2013-02-19 03:15:01 +01:00
|
|
|
CPPFLAGS=-I..
|
|
|
|
|
2002-05-01 05:17:33 +02:00
|
|
|
t1:
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
|
2010-11-05 08:23:38 +01:00
|
|
|
tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv
|
2010-11-05 08:23:38 +01:00
|
|
|
awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv
|
2002-05-01 05:17:33 +02:00
|
|
|
|
|
|
|
t2:
|
2003-09-09 15:07:10 +02:00
|
|
|
cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out
|
|
|
|
chmod 600 $(OBJ)/t2.out
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub
|
2002-05-01 05:17:33 +02:00
|
|
|
|
|
|
|
t3:
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/t3.out
|
|
|
|
${TEST_SSH_SSHKEYGEN} -if $(OBJ)/t3.out | diff - ${.CURDIR}/rsa_openssh.pub
|
2002-05-01 05:17:33 +02:00
|
|
|
|
|
|
|
t4:
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -lf ${.CURDIR}/rsa_openssh.pub |\
|
2002-05-01 05:17:33 +02:00
|
|
|
awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
|
|
|
|
|
|
|
|
t5:
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -Bf ${.CURDIR}/rsa_openssh.pub |\
|
2002-05-01 05:17:33 +02:00
|
|
|
awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
|
|
|
|
|
|
|
|
t6:
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1
|
|
|
|
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2
|
2003-09-09 15:07:10 +02:00
|
|
|
chmod 600 $(OBJ)/t6.out1
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2
|
2002-05-01 05:17:33 +02:00
|
|
|
|
2003-09-09 15:07:10 +02:00
|
|
|
$(OBJ)/t7.out:
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -q -t rsa -N '' -f $@
|
2002-05-01 05:17:33 +02:00
|
|
|
|
2003-09-09 15:07:10 +02:00
|
|
|
t7: $(OBJ)/t7.out
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t7.out > /dev/null
|
|
|
|
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t7.out > /dev/null
|
2002-05-01 05:17:33 +02:00
|
|
|
|
2010-11-07 22:00:27 +01:00
|
|
|
$(OBJ)/t8.out:
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -q -t dsa -N '' -f $@
|
2010-11-05 08:23:38 +01:00
|
|
|
|
2010-11-07 22:00:27 +01:00
|
|
|
t8: $(OBJ)/t8.out
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t8.out > /dev/null
|
|
|
|
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t8.out > /dev/null
|
2010-11-05 08:23:38 +01:00
|
|
|
|
2010-11-07 22:00:27 +01:00
|
|
|
$(OBJ)/t9.out:
|
2010-11-05 08:23:38 +01:00
|
|
|
test "${TEST_SSH_ECC}" != yes || \
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -q -t ecdsa -N '' -f $@
|
2010-11-05 08:23:38 +01:00
|
|
|
|
2010-11-07 22:00:27 +01:00
|
|
|
t9: $(OBJ)/t9.out
|
2010-11-05 08:23:38 +01:00
|
|
|
test "${TEST_SSH_ECC}" != yes || \
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t9.out > /dev/null
|
2010-11-05 08:23:38 +01:00
|
|
|
test "${TEST_SSH_ECC}" != yes || \
|
2011-01-17 00:51:40 +01:00
|
|
|
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t9.out > /dev/null
|
2010-11-05 08:23:38 +01:00
|
|
|
|
2012-12-12 02:51:54 +01:00
|
|
|
t-exec: ${LTESTS:=.sh}
|
2003-09-04 07:37:58 +02:00
|
|
|
@if [ "x$?" = "x" ]; then exit 0; fi; \
|
|
|
|
for TEST in ""$?; do \
|
|
|
|
echo "run test $${TEST}" ... 1>&2; \
|
2010-07-02 05:40:16 +02:00
|
|
|
(env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
|
2003-09-04 07:37:58 +02:00
|
|
|
done
|
2008-03-12 14:17:00 +01:00
|
|
|
|
|
|
|
t-exec-interop: ${INTEROP_TESTS:=.sh}
|
|
|
|
@if [ "x$?" = "x" ]; then exit 0; fi; \
|
|
|
|
for TEST in ""$?; do \
|
|
|
|
echo "run test $${TEST}" ... 1>&2; \
|
2010-07-02 05:40:16 +02:00
|
|
|
(env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
|
2008-03-12 14:17:00 +01:00
|
|
|
done
|
|
|
|
|
2010-11-05 08:23:38 +01:00
|
|
|
# Not run by default
|
|
|
|
interop: ${INTEROP_TARGETS}
|