diff options
Diffstat (limited to 'crypto/pkcs7/pk7_doit.c')
-rw-r--r-- | crypto/pkcs7/pk7_doit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index 030718a1cb..2cf62b62cd 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -94,12 +94,11 @@ static int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri, size_t eklen; pkey = X509_get0_pubkey(ri->cert); - - if (!pkey) + if (pkey == NULL) return 0; pctx = EVP_PKEY_CTX_new(pkey, NULL); - if (!pctx) + if (pctx == NULL) return 0; if (EVP_PKEY_encrypt_init(pctx) <= 0) @@ -143,11 +142,10 @@ static int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen, EVP_PKEY_CTX *pctx = NULL; unsigned char *ek = NULL; size_t eklen; - int ret = -1; pctx = EVP_PKEY_CTX_new(pkey, NULL); - if (!pctx) + if (pctx == NULL) return -1; if (EVP_PKEY_decrypt_init(pctx) <= 0) @@ -1067,7 +1065,7 @@ int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, os = si->enc_digest; pkey = X509_get0_pubkey(x509); - if (!pkey) { + if (pkey == NULL) { ret = -1; goto err; } |