diff options
author | J Mohan Rao Arisankala <mohan@barracuda.com> | 2016-02-24 06:06:24 +0530 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-26 11:16:33 -0500 |
commit | 219f3ca61c2902425047974441d953e6042250ec (patch) | |
tree | 56aada9d804980930abbe625247210a41749cc87 /crypto/asn1/a_sign.c | |
parent | 4f25aecd7599842205b135c0731b20a3c2c5d97b (diff) | |
download | openssl-219f3ca61c2902425047974441d953e6042250ec.tar.gz |
check with NULL
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/asn1/a_sign.c')
-rw-r--r-- | crypto/asn1/a_sign.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c index dbf2812d6f..2abbe77805 100644 --- a/crypto/asn1/a_sign.c +++ b/crypto/asn1/a_sign.c @@ -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 (NULL == type || NULL == pkey) { + if (type == NULL || pkey == NULL) { ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_CONTEXT_NOT_INITIALISED); goto err; } - if (NULL == pkey->ameth) { + if (pkey->ameth == NULL) { ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED); goto err; } |