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:
@@ -1453,9 +1453,14 @@ find_sig_alg(const heim_oid *oid)
|
|||||||
static const AlgorithmIdentifier *
|
static const AlgorithmIdentifier *
|
||||||
alg_for_privatekey(const hx509_private_key pk, int type)
|
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;
|
unsigned int i;
|
||||||
|
|
||||||
|
if (pk->ops == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
keytype = pk->ops->key_oid;
|
||||||
|
|
||||||
for (i = 0; sig_algs[i]; i++) {
|
for (i = 0; sig_algs[i]; i++) {
|
||||||
if (sig_algs[i]->key_oid == NULL)
|
if (sig_algs[i]->key_oid == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user