Darren Tucker | 5d909f0 | 2005-03-07 18:35:34 +1100 | [diff] [blame] | 1 | # $OpenBSD: Makefile,v 1.36 2005/03/04 08:48:46 djm 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 \ |
Darren Tucker | 4c37ef0 | 2004-06-16 20:08:56 +1000 | [diff] [blame] | 16 | envpass \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 17 | transfer \ |
Darren Tucker | dc001a5 | 2003-10-08 17:47:19 +1000 | [diff] [blame] | 18 | banner \ |
Darren Tucker | d57a76e | 2003-06-18 22:32:51 +1000 | [diff] [blame] | 19 | rekey \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 20 | stderr-data \ |
| 21 | stderr-after-eof \ |
| 22 | broken-pipe \ |
| 23 | try-ciphers \ |
| 24 | yes-head \ |
Darren Tucker | 017fd61 | 2004-02-29 20:30:17 +1100 | [diff] [blame] | 25 | login-timeout \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 26 | agent \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 27 | agent-getpeereid \ |
| 28 | agent-timeout \ |
| 29 | agent-ptrace \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 30 | keyscan \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 31 | keygen-change \ |
Darren Tucker | 50433a9 | 2004-06-16 20:15:59 +1000 | [diff] [blame] | 32 | scp \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 33 | sftp \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 34 | sftp-cmds \ |
Darren Tucker | a4040f5 | 2003-06-18 22:35:11 +1000 | [diff] [blame] | 35 | sftp-badcmds \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 36 | sftp-batch \ |
Darren Tucker | 1c56ef6 | 2005-03-07 17:36:18 +1100 | [diff] [blame] | 37 | sftp-glob \ |
Darren Tucker | 50cea67 | 2003-06-18 22:45:34 +1000 | [diff] [blame] | 38 | reconfigure \ |
Darren Tucker | e2f2be7 | 2003-07-03 20:27:55 +1000 | [diff] [blame] | 39 | dynamic-forward \ |
Darren Tucker | e7d0583 | 2004-06-16 20:22:22 +1000 | [diff] [blame] | 40 | forwarding \ |
Darren Tucker | 977a9d2 | 2004-06-25 13:45:18 +1000 | [diff] [blame] | 41 | multiplex \ |
Darren Tucker | 124f58e | 2004-12-06 23:07:37 +1100 | [diff] [blame] | 42 | reexec \ |
| 43 | brokenkeys |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 44 | |
| 45 | USER!= id -un |
Darren Tucker | 7b6cb5c | 2003-09-14 13:16:55 +1000 | [diff] [blame] | 46 | CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ |
| 47 | authorized_keys_${USER} known_hosts pidfile \ |
Darren Tucker | 3206e57 | 2004-12-06 23:04:57 +1100 | [diff] [blame] | 48 | ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 49 | rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ |
| 50 | rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ |
Darren Tucker | 50433a9 | 2004-06-16 20:15:59 +1000 | [diff] [blame] | 51 | ls.copy banner.in banner.out empty.in \ |
Darren Tucker | 5d909f0 | 2005-03-07 18:35:34 +1100 | [diff] [blame] | 52 | scp-ssh-wrapper.scp ssh_proxy_envpass \ |
Darren Tucker | 50433a9 | 2004-06-16 20:15:59 +1000 | [diff] [blame] | 53 | remote_pid |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 54 | |
Darren Tucker | b12d16f | 2003-09-14 11:40:35 +1000 | [diff] [blame] | 55 | #LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 56 | |
| 57 | t1: |
| 58 | ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv |
| 59 | |
| 60 | t2: |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 61 | cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out |
| 62 | chmod 600 $(OBJ)/t2.out |
| 63 | ssh-keygen -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 64 | |
| 65 | t3: |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 66 | ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/rsa_secsh.pub |
| 67 | ssh-keygen -if $(OBJ)/rsa_secsh.pub | diff - ${.CURDIR}/rsa_openssh.pub |
| 68 | rm -f ${.CURDIR}/rsa_secsh.pub |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 69 | |
| 70 | t4: |
| 71 | ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\ |
| 72 | awk '{print $$2}' | diff - ${.CURDIR}/t4.ok |
| 73 | |
| 74 | t5: |
| 75 | ssh-keygen -Bf ${.CURDIR}/rsa_openssh.pub |\ |
| 76 | awk '{print $$2}' | diff - ${.CURDIR}/t5.ok |
| 77 | |
| 78 | t6: |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 79 | ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1 |
| 80 | ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2 |
| 81 | chmod 600 $(OBJ)/t6.out1 |
| 82 | ssh-keygen -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2 |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 83 | |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 84 | $(OBJ)/t7.out: |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 85 | ssh-keygen -q -t rsa -N '' -f $@ |
| 86 | |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 87 | t7: $(OBJ)/t7.out |
| 88 | ssh-keygen -lf $(OBJ)/t7.out > /dev/null |
| 89 | ssh-keygen -Bf $(OBJ)/t7.out > /dev/null |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 90 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 91 | t-exec: ${LTESTS:=.sh} |
| 92 | @if [ "x$?" = "x" ]; then exit 0; fi; \ |
| 93 | for TEST in ""$?; do \ |
| 94 | echo "run test $${TEST}" ... 1>&2; \ |
Darren Tucker | b712fcc | 2005-03-07 18:27:28 +1100 | [diff] [blame] | 95 | (env SUDO=${SUDO} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 96 | done |