From 51fc4ba5a14539dec9858341edac9b2cf1f8eb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 14 Feb 2009 04:17:37 +0000 Subject: [PATCH] don't deref ops, they might be null. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24691 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hx509/crypto.c b/lib/hx509/crypto.c index ef3f5624f..d03e656aa 100644 --- a/lib/hx509/crypto.c +++ b/lib/hx509/crypto.c @@ -407,7 +407,7 @@ ecdsa_create_signature(hx509_context context, unsigned int siglen; int ret; - if (der_heim_oid_cmp(signer->ops->key_oid, &asn1_oid_id_ecPublicKey) != 0) + if (signer->ops && der_heim_oid_cmp(signer->ops->key_oid, &asn1_oid_id_ecPublicKey) != 0) _hx509_abort("internal error passing private key to wrong ops"); sig_oid = sig_alg->sig_oid; @@ -638,7 +638,7 @@ rsa_create_signature(hx509_context context, size_t size; int ret; - if (der_heim_oid_cmp(signer->ops->key_oid, &asn1_oid_id_pkcs1_rsaEncryption) != 0) + if (signer->ops && der_heim_oid_cmp(signer->ops->key_oid, &asn1_oid_id_pkcs1_rsaEncryption) != 0) return HX509_ALG_NOT_SUPP; if (alg)