4
0
mirror of https://github.com/QuasarApp/openssl.git synced 2025-05-08 07:29:41 +00:00

explicit check for NULL

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
J Mohan Rao Arisankala 2016-02-24 06:00:48 +05:30 committed by Rich Salz
parent 2c91b3f5bf
commit 4f25aecd75

@ -243,12 +243,12 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
type = EVP_MD_CTX_md(ctx);
pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_pkey_ctx(ctx));
if (!type || !pkey) {
if (NULL == type || NULL == pkey) {
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_CONTEXT_NOT_INITIALISED);
goto err;
}
if (!pkey->ameth) {
if (NULL == pkey->ameth) {
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED);
goto err;
}