Darren Tucker | dc001a5 | 2003-10-08 17:47:19 +1000 | [diff] [blame^] | 1 | # $OpenBSD: Makefile,v 1.25 2003/10/07 01:52:13 dtucker Exp $ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 2 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec |
| 4 | tests: $(REGRESS_TARGETS) |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 5 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 6 | clean: |
Darren Tucker | b12d16f | 2003-09-14 11:40:35 +1000 | [diff] [blame] | 7 | for F in $(CLEANFILES); do rm -f $(OBJ)$$F; done |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 8 | distclean: clean |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 9 | |
| 10 | LTESTS= connect \ |
| 11 | proxy-connect \ |
| 12 | connect-privsep \ |
| 13 | proto-version \ |
| 14 | proto-mismatch \ |
| 15 | exit-status \ |
| 16 | transfer \ |
Darren Tucker | dc001a5 | 2003-10-08 17:47:19 +1000 | [diff] [blame^] | 17 | banner \ |
Darren Tucker | d57a76e | 2003-06-18 22:32:51 +1000 | [diff] [blame] | 18 | rekey \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 19 | stderr-data \ |
| 20 | stderr-after-eof \ |
| 21 | broken-pipe \ |
| 22 | try-ciphers \ |
| 23 | yes-head \ |
| 24 | agent \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 25 | agent-getpeereid \ |
| 26 | agent-timeout \ |
| 27 | agent-ptrace \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 28 | keyscan \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 29 | keygen-change \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 30 | sftp \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 31 | sftp-cmds \ |
Darren Tucker | a4040f5 | 2003-06-18 22:35:11 +1000 | [diff] [blame] | 32 | sftp-badcmds \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 33 | sftp-batch \ |
Darren Tucker | 50cea67 | 2003-06-18 22:45:34 +1000 | [diff] [blame] | 34 | reconfigure \ |
Darren Tucker | e2f2be7 | 2003-07-03 20:27:55 +1000 | [diff] [blame] | 35 | dynamic-forward \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 36 | forwarding |
| 37 | |
| 38 | USER!= id -un |
Darren Tucker | 7b6cb5c | 2003-09-14 13:16:55 +1000 | [diff] [blame] | 39 | CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ |
| 40 | authorized_keys_${USER} known_hosts pidfile \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 41 | ssh_config ssh_proxy sshd_config sshd_proxy \ |
| 42 | rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ |
| 43 | rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ |
Darren Tucker | dc001a5 | 2003-10-08 17:47:19 +1000 | [diff] [blame^] | 44 | ls.copy banner.in banner.out remote_pid |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 45 | |
Darren Tucker | b12d16f | 2003-09-14 11:40:35 +1000 | [diff] [blame] | 46 | #LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 47 | |
| 48 | t1: |
| 49 | ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv |
| 50 | |
| 51 | t2: |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 52 | cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out |
| 53 | chmod 600 $(OBJ)/t2.out |
| 54 | ssh-keygen -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 55 | |
| 56 | t3: |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 57 | ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/rsa_secsh.pub |
| 58 | ssh-keygen -if $(OBJ)/rsa_secsh.pub | diff - ${.CURDIR}/rsa_openssh.pub |
| 59 | rm -f ${.CURDIR}/rsa_secsh.pub |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 60 | |
| 61 | t4: |
| 62 | ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\ |
| 63 | awk '{print $$2}' | diff - ${.CURDIR}/t4.ok |
| 64 | |
| 65 | t5: |
| 66 | ssh-keygen -Bf ${.CURDIR}/rsa_openssh.pub |\ |
| 67 | awk '{print $$2}' | diff - ${.CURDIR}/t5.ok |
| 68 | |
| 69 | t6: |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 70 | ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1 |
| 71 | ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2 |
| 72 | chmod 600 $(OBJ)/t6.out1 |
| 73 | ssh-keygen -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2 |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 74 | |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 75 | $(OBJ)/t7.out: |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 76 | ssh-keygen -q -t rsa -N '' -f $@ |
| 77 | |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 78 | t7: $(OBJ)/t7.out |
| 79 | ssh-keygen -lf $(OBJ)/t7.out > /dev/null |
| 80 | ssh-keygen -Bf $(OBJ)/t7.out > /dev/null |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 81 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 82 | t-exec: ${LTESTS:=.sh} |
| 83 | @if [ "x$?" = "x" ]; then exit 0; fi; \ |
| 84 | for TEST in ""$?; do \ |
| 85 | echo "run test $${TEST}" ... 1>&2; \ |
| 86 | (sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ |
| 87 | done |