upstream: Skip RFC4716 format import and export tests when built
without OpenSSL. OpenBSD-Regress-ID: d2c2d5d38c1acc2b88cc99cfe00a2eb8bb39dfa4
This commit is contained in:
parent
f5ccb5895d
commit
55e17101a9
|
@ -1,4 +1,4 @@
|
|||
# $OpenBSD: keygen-convert.sh,v 1.5 2021/07/23 05:53:02 dtucker Exp $
|
||||
# $OpenBSD: keygen-convert.sh,v 1.6 2021/07/24 02:57:28 dtucker Exp $
|
||||
# Placed in the Public Domain.
|
||||
|
||||
tid="convert keys"
|
||||
|
@ -9,12 +9,17 @@ echo hunter2
|
|||
EOD
|
||||
chmod u+x $OBJ/askpass
|
||||
|
||||
if ${SSHKEYGEN} -? 2>&1 | grep "ssh-keygen -e" >/dev/null; then
|
||||
test_import_export=1
|
||||
fi
|
||||
|
||||
for t in ${SSH_KEYTYPES}; do
|
||||
# generate user key for agent
|
||||
trace "generating $t key"
|
||||
rm -f $OBJ/$t-key
|
||||
${SSHKEYGEN} -q -N "" -t $t -f $OBJ/$t-key
|
||||
|
||||
if test "x$test_import_export" = "x1"; then
|
||||
trace "export $t private to rfc4716 public"
|
||||
${SSHKEYGEN} -q -e -f $OBJ/$t-key >$OBJ/$t-key-rfc || \
|
||||
fail "export $t private to rfc4716 public"
|
||||
|
@ -33,6 +38,7 @@ for t in ${SSH_KEYTYPES}; do
|
|||
cut -f1,2 -d " " $OBJ/$t-key.pub >$OBJ/$t-key-nocomment.pub
|
||||
cmp $OBJ/$t-key-nocomment.pub $OBJ/$t-rfc-imported || \
|
||||
fail "$t imported differs from original"
|
||||
fi
|
||||
|
||||
trace "set passphrase $t"
|
||||
${SSHKEYGEN} -q -p -P '' -N 'hunter2' -f $OBJ/$t-key >/dev/null || \
|
||||
|
|
Loading…
Reference in New Issue