(hx509_crypto_select): check sig_algs[j]->key_oid

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19157 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-11-27 13:29:19 +00:00
parent 99f80461cd
commit 18b698ae86

View File

@@ -2154,7 +2154,8 @@ hx509_crypto_select(const hx509_context context,
continue;
if (der_heim_oid_cmp((*sig_algs[j]->sig_oid)(), &peer->val[i].algorithm) != 0)
continue;
if (keytype && der_heim_oid_cmp(keytype, (*sig_algs[j]->key_oid)()))
if (keytype && sig_algs[j]->key_oid &&
der_heim_oid_cmp(keytype, (*sig_algs[j]->key_oid)()))
continue;
/* found one, use that */