2003-07-03 10:27:55 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.24 2003/07/03 08:24:13 markus Exp $
|
2002-05-01 03:17:33 +00:00
|
|
|
|
2003-09-04 05:37:58 +00:00
|
|
|
OBJ ?= `pwd`
|
|
|
|
|
|
|
|
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec
|
|
|
|
tests: $(REGRESS_TARGETS)
|
2002-05-01 03:17:33 +00:00
|
|
|
|
2003-01-22 06:53:16 +00:00
|
|
|
CLEANFILES+= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2
|
2003-09-04 05:37:58 +00:00
|
|
|
clean:
|
|
|
|
@for F in $(CLEANFILES); do rm -f $(OBJ)/$${F}; done
|
|
|
|
distclean: clean
|
2002-05-01 03:17:33 +00:00
|
|
|
|
|
|
|
LTESTS= connect \
|
|
|
|
proxy-connect \
|
|
|
|
connect-privsep \
|
|
|
|
proto-version \
|
|
|
|
proto-mismatch \
|
|
|
|
exit-status \
|
|
|
|
transfer \
|
2003-06-18 12:32:51 +00:00
|
|
|
rekey \
|
2002-05-01 03:17:33 +00:00
|
|
|
stderr-data \
|
|
|
|
stderr-after-eof \
|
|
|
|
broken-pipe \
|
|
|
|
try-ciphers \
|
|
|
|
yes-head \
|
|
|
|
agent \
|
2003-01-22 06:53:16 +00:00
|
|
|
agent-getpeereid \
|
|
|
|
agent-timeout \
|
|
|
|
agent-ptrace \
|
2002-05-01 03:17:33 +00:00
|
|
|
keyscan \
|
2003-01-22 06:53:16 +00:00
|
|
|
keygen-change \
|
2002-05-01 03:17:33 +00:00
|
|
|
sftp \
|
2003-01-22 06:53:16 +00:00
|
|
|
sftp-cmds \
|
2003-06-18 12:35:11 +00:00
|
|
|
sftp-badcmds \
|
2003-01-22 06:53:16 +00:00
|
|
|
sftp-batch \
|
2003-06-18 12:45:34 +00:00
|
|
|
reconfigure \
|
2003-07-03 10:27:55 +00:00
|
|
|
dynamic-forward \
|
2002-05-01 03:17:33 +00:00
|
|
|
forwarding
|
|
|
|
|
|
|
|
USER!= id -un
|
|
|
|
CLEANFILES+= authorized_keys_${USER} known_hosts pidfile \
|
|
|
|
ssh_config ssh_proxy sshd_config sshd_proxy \
|
|
|
|
rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
|
|
|
|
rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
|
2003-09-04 05:37:58 +00:00
|
|
|
ls.copy remote_pid
|
2002-05-01 03:17:33 +00:00
|
|
|
|
|
|
|
#LTESTS+= ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
|
|
|
|
|
|
|
|
t1:
|
|
|
|
ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
|
|
|
|
|
|
|
|
t2:
|
2003-09-09 13:07:10 +00:00
|
|
|
cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out
|
|
|
|
chmod 600 $(OBJ)/t2.out
|
|
|
|
ssh-keygen -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub
|
2002-05-01 03:17:33 +00:00
|
|
|
|
|
|
|
t3:
|
2003-09-04 05:37:58 +00:00
|
|
|
ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/rsa_secsh.pub
|
|
|
|
ssh-keygen -if $(OBJ)/rsa_secsh.pub | diff - ${.CURDIR}/rsa_openssh.pub
|
|
|
|
rm -f ${.CURDIR}/rsa_secsh.pub
|
2002-05-01 03:17:33 +00:00
|
|
|
|
|
|
|
t4:
|
|
|
|
ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\
|
|
|
|
awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
|
|
|
|
|
|
|
|
t5:
|
|
|
|
ssh-keygen -Bf ${.CURDIR}/rsa_openssh.pub |\
|
|
|
|
awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
|
|
|
|
|
|
|
|
t6:
|
2003-09-09 13:07:10 +00:00
|
|
|
ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1
|
|
|
|
ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2
|
|
|
|
chmod 600 $(OBJ)/t6.out1
|
|
|
|
ssh-keygen -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2
|
2002-05-01 03:17:33 +00:00
|
|
|
|
2003-09-09 13:07:10 +00:00
|
|
|
$(OBJ)/t7.out:
|
2002-05-01 03:17:33 +00:00
|
|
|
ssh-keygen -q -t rsa -N '' -f $@
|
|
|
|
|
2003-09-09 13:07:10 +00:00
|
|
|
t7: $(OBJ)/t7.out
|
|
|
|
ssh-keygen -lf $(OBJ)/t7.out > /dev/null
|
|
|
|
ssh-keygen -Bf $(OBJ)/t7.out > /dev/null
|
2002-05-01 03:17:33 +00:00
|
|
|
|
2003-09-04 05:37:58 +00:00
|
|
|
t-exec: ${LTESTS:=.sh}
|
|
|
|
@if [ "x$?" = "x" ]; then exit 0; fi; \
|
|
|
|
for TEST in ""$?; do \
|
|
|
|
echo "run test $${TEST}" ... 1>&2; \
|
|
|
|
(sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
|
|
|
|
done
|