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