disable RSA tests when algorithm is not supported
Unbreaks "make test" when compiled --without-openssl. Similar treatment to how we do DSA and ECDSA.
This commit is contained in:
parent
668d270a6c
commit
d52b650921
|
@ -156,29 +156,38 @@ TEST_SSH_SSHKEYGEN?=ssh-keygen
|
|||
CPPFLAGS=-I..
|
||||
|
||||
t1:
|
||||
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
|
||||
tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv
|
||||
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv
|
||||
awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv
|
||||
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-rsa ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv ; \
|
||||
tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv ; \
|
||||
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv ; \
|
||||
awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv ; \
|
||||
${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv ; \
|
||||
fi
|
||||
|
||||
t2:
|
||||
cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out
|
||||
chmod 600 $(OBJ)/t2.out
|
||||
${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-rsa ; then \
|
||||
cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out ; \
|
||||
chmod 600 $(OBJ)/t2.out ; \
|
||||
${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub ; \
|
||||
fi
|
||||
|
||||
t3:
|
||||
${TEST_SSH_SSHKEYGEN} -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/t3.out
|
||||
${TEST_SSH_SSHKEYGEN} -if $(OBJ)/t3.out | diff - ${.CURDIR}/rsa_openssh.pub
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-rsa ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/t3.out ; \
|
||||
${TEST_SSH_SSHKEYGEN} -if $(OBJ)/t3.out | diff - ${.CURDIR}/rsa_openssh.pub ; \
|
||||
fi
|
||||
|
||||
t4:
|
||||
${TEST_SSH_SSHKEYGEN} -E md5 -lf ${.CURDIR}/rsa_openssh.pub |\
|
||||
awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-rsa ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -E md5 -lf ${.CURDIR}/rsa_openssh.pub |\
|
||||
awk '{print $$2}' | diff - ${.CURDIR}/t4.ok ; \
|
||||
fi
|
||||
|
||||
t5:
|
||||
${TEST_SSH_SSHKEYGEN} -Bf ${.CURDIR}/rsa_openssh.pub |\
|
||||
awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
|
||||
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-rsa ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -Bf ${.CURDIR}/rsa_openssh.pub |\
|
||||
awk '{print $$2}' | diff - ${.CURDIR}/t5.ok ; \
|
||||
fi
|
||||
t6:
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-dss ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1 ; \
|
||||
|
@ -188,11 +197,15 @@ t6:
|
|||
fi
|
||||
|
||||
$(OBJ)/t7.out:
|
||||
${TEST_SSH_SSHKEYGEN} -q -t rsa -N '' -f $@
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-dss ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -q -t rsa -N '' -f $@ ; \
|
||||
fi
|
||||
|
||||
t7: $(OBJ)/t7.out
|
||||
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t7.out > /dev/null
|
||||
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t7.out > /dev/null
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-dss ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t7.out > /dev/null ; \
|
||||
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t7.out > /dev/null ; \
|
||||
fi
|
||||
|
||||
$(OBJ)/t8.out:
|
||||
set -xe ; if ssh -Q key | grep -q ^ssh-dss ; then \
|
||||
|
@ -224,8 +237,10 @@ t10: $(OBJ)/t10.out
|
|||
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t10.out > /dev/null
|
||||
|
||||
t11:
|
||||
${TEST_SSH_SSHKEYGEN} -E sha256 -lf ${.CURDIR}/rsa_openssh.pub |\
|
||||
awk '{print $$2}' | diff - ${.CURDIR}/t11.ok
|
||||
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q ^ssh-dss ; then \
|
||||
${TEST_SSH_SSHKEYGEN} -E sha256 -lf ${.CURDIR}/rsa_openssh.pub |\
|
||||
awk '{print $$2}' | diff - ${.CURDIR}/t11.ok ; \
|
||||
fi
|
||||
|
||||
$(OBJ)/t12.out:
|
||||
${TEST_SSH_SSHKEYGEN} -q -t ed25519 -N '' -C 'test-comment-1234' -f $@
|
||||
|
|
Loading…
Reference in New Issue