59
62
INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers
60
63
#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
63
CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
68
CLEANFILES= t2.out t3.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
69
t8.out t8.out.pub t9.out t9.out.pub \
64
70
authorized_keys_${USER} known_hosts pidfile \
65
71
ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \
66
72
rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
69
75
scp-ssh-wrapper.scp ssh_proxy_envpass remote_pid \
70
76
sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \
71
77
known_hosts-cert host_ca_key* cert_host_key* \
72
putty.rsa2 sshd_proxy_orig \
73
authorized_principals_${USER}
78
putty.rsa2 sshd_proxy_orig ssh_proxy_bak \
79
key.rsa-* key.dsa-* key.ecdsa-* \
80
authorized_principals_${USER} expect actual
75
82
# Enable all malloc(3) randomisations and checks
76
83
TEST_ENV= "MALLOC_OPTIONS=AFGJPRX"
85
TEST_SSH_SSHKEYGEN?=ssh-keygen
79
ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
88
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
89
tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv
90
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv
91
awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv
92
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv
82
95
cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out
83
96
chmod 600 $(OBJ)/t2.out
84
ssh-keygen -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub
97
${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub
87
ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/rsa_secsh.pub
88
ssh-keygen -if $(OBJ)/rsa_secsh.pub | diff - ${.CURDIR}/rsa_openssh.pub
89
rm -f ${.CURDIR}/rsa_secsh.pub
100
${TEST_SSH_SSHKEYGEN} -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/t3.out
101
${TEST_SSH_SSHKEYGEN} -if $(OBJ)/t3.out | diff - ${.CURDIR}/rsa_openssh.pub
92
ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\
104
${TEST_SSH_SSHKEYGEN} -lf ${.CURDIR}/rsa_openssh.pub |\
93
105
awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
96
ssh-keygen -Bf ${.CURDIR}/rsa_openssh.pub |\
108
${TEST_SSH_SSHKEYGEN} -Bf ${.CURDIR}/rsa_openssh.pub |\
97
109
awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
100
ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1
101
ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2
112
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1
113
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2
102
114
chmod 600 $(OBJ)/t6.out1
103
ssh-keygen -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2
115
${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2
106
ssh-keygen -q -t rsa -N '' -f $@
118
${TEST_SSH_SSHKEYGEN} -q -t rsa -N '' -f $@
108
120
t7: $(OBJ)/t7.out
109
ssh-keygen -lf $(OBJ)/t7.out > /dev/null
110
ssh-keygen -Bf $(OBJ)/t7.out > /dev/null
121
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t7.out > /dev/null
122
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t7.out > /dev/null
125
${TEST_SSH_SSHKEYGEN} -q -t dsa -N '' -f $@
128
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t8.out > /dev/null
129
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t8.out > /dev/null
132
test "${TEST_SSH_ECC}" != yes || \
133
${TEST_SSH_SSHKEYGEN} -q -t ecdsa -N '' -f $@
136
test "${TEST_SSH_ECC}" != yes || \
137
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t9.out > /dev/null
138
test "${TEST_SSH_ECC}" != yes || \
139
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t9.out > /dev/null
112
141
t-exec: ${LTESTS:=.sh}
113
142
@if [ "x$?" = "x" ]; then exit 0; fi; \