Only try ecdsa if there really is ecdsa support

This commit is contained in:
Love Hornquist Astrand
2009-08-26 00:30:36 -07:00
parent 23aebd619b
commit e9603a6446

View File

@@ -358,6 +358,7 @@ ${kinit} --password-file=${objdir}/foopassword foo@${R} || \
${kdestroy}
rsa=yes
ecdsa=yes
pkinit=no
if ${hxtool} info | grep 'rsa: hx509 null RSA' > /dev/null ; then
rsa=no
@@ -369,6 +370,11 @@ if ${kinit} --help 2>&1 | grep "CA certificates" > /dev/null; then
pkinit=yes
fi
if ${hxtool} info | grep 'ecdsa: hcrypto null' > /dev/null ; then
ecdsa=no
else
# If we support pkinit and have RSA, lets try that
if test "$pkinit" = yes -a "$rsa" = yes ; then
@@ -408,7 +414,7 @@ if test "$pkinit" = yes -a "$rsa" = yes ; then
done
if ${hxtool} info | grep 'ecdsa:' > /dev/null ; then
if test "$ecdsa" = yes > /dev/null ; then
echo "Trying pk-init (ec certificate)"
> messages.log
${kinit} -C FILE:${base}/pkinit-ec.crt,${base}/pkinit-ec.key bar@${R} || \