1 # $OpenBSD: ssh-com-keygen.sh,v 1.4 2004/02/24 17:06:52 markus Exp $
2 # Placed in the Public Domain.
4 tid
="ssh.com key import"
6 #TEST_COMBASE=/path/to/ssh/com/binaries
7 if [ "X${TEST_COMBASE}" = "X" ]; then
8 fatal
'$TEST_COMBASE is not set'
32 OPENSSHPRV
=${OBJ}/opensshkey
33 OPENSSHPUB
=${OPENSSHPRV}.pub
36 for v
in ${VERSIONS}; do
37 keygen
=${TEST_COMBASE}/${v}/ssh-keygen2
38 if [ ! -x ${keygen} ]; then
48 verbose
"ssh-keygen $v/$t"
49 rm -f $COMPRV $COMPUB $OPENSSHPRV $OPENSSHPUB
50 ${keygen} -q -P -t $t ${COMPRV} > /dev
/null
2>&1
52 fail
"${keygen} -t $t failed"
55 ${SSHKEYGEN} -if ${COMPUB} > ${OPENSSHPUB}
57 fail
"import public key ($v/$t) failed"
60 ${SSHKEYGEN} -if ${COMPRV} > ${OPENSSHPRV}
62 fail
"import private key ($v/$t) failed"
65 chmod 600 ${OPENSSHPRV}
66 ${SSHKEYGEN} -yf ${OPENSSHPRV} |\
69 fail
"public keys ($v/$t) differ"
74 rm -f $COMPRV $COMPUB $OPENSSHPRV $OPENSSHPUB