Don't try pkinit if there is no rsa

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17370 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-30 07:49:03 +00:00
parent 5d5378db66
commit 532985afc3

View File

@@ -54,6 +54,7 @@ klist="../../kuser/klist -c $cache"
kgetcred="../../kuser/kgetcred -c $cache" kgetcred="../../kuser/kgetcred -c $cache"
kdestroy="../../kuser/kdestroy -c $cache" kdestroy="../../kuser/kdestroy -c $cache"
ktutil="../../admin/ktutil" ktutil="../../admin/ktutil"
hxtool="../../lib/hx509/hxtool"
KRB5_CONFIG="${objdir}/krb5.conf" KRB5_CONFIG="${objdir}/krb5.conf"
export KRB5_CONFIG export KRB5_CONFIG
@@ -162,8 +163,16 @@ ${kdestroy}
# ${kdestroy} # ${kdestroy}
#done #done
# If we support pkinit, lets try that rsa=yes
if ${kinit} --help 2>&1 | grep "CA certificates" > /dev/null ; then if ${hxtool} info | grep 'rsa: hx509 null RSA' > /dev/null ; then
rsa=no
fi
if ${kinit} --help 2>&1 | grep "CA certificates" > /dev/null; then
pkinit=yes
fi
# If we support pkinit and have RSA, lets try that
if test "$pkinit" = yes -a "$rsa" = yes ; then
echo "Trying pk-init (princiapl in certificate)" echo "Trying pk-init (princiapl in certificate)"
base="${srcdir}/../../lib/hx509/data" base="${srcdir}/../../lib/hx509/data"
${kinit} -C FILE:${base}/pkinit.crt,${base}/pkinit.key bar@${R} || exitcode=1 ${kinit} -C FILE:${base}/pkinit.crt,${base}/pkinit.key bar@${R} || exitcode=1
@@ -174,7 +183,7 @@ if ${kinit} --help 2>&1 | grep "CA certificates" > /dev/null ; then
${kgetcred} ${server}@${R} || exitcode=1 ${kgetcred} ${server}@${R} || exitcode=1
${kdestroy} ${kdestroy}
else else
echo no pkinit echo "no pkinit (pkinit: $pkinit, rsa: $rsa)"
fi fi
echo "killing kdc (${kdcpid})" echo "killing kdc (${kdcpid})"