Latest update.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user