don't deref ops, they might be null.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24690 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-02-14 04:17:27 +00:00
parent b7c044ec6b
commit ea8cb168b3

View File

@@ -1453,9 +1453,14 @@ find_sig_alg(const heim_oid *oid)
static const AlgorithmIdentifier *
alg_for_privatekey(const hx509_private_key pk, int type)
{
const heim_oid *keytype = pk->ops->key_oid;
const heim_oid *keytype;
unsigned int i;
if (pk->ops == NULL)
return NULL;
keytype = pk->ops->key_oid;
for (i = 0; sig_algs[i]; i++) {
if (sig_algs[i]->key_oid == NULL)
continue;