Decrypt CMS EnvelopedData/AuthEnvelopedData recipient key material using a private key and optional peer certificate.
Declared in <openssl/cms.h>
int
CMS_decrypt_set1_pkey_and_peer(
CMS_ContentInfo* cms,
EVP_PKEY* pk,
X509* cert,
X509* peer);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| cms | CMS ContentInfo to decrypt; on success stores pk for a later CMS_decrypt() with NULL key arguments. |
| pk | Recipient private key used to unwrap the content-encryption key. |
| cert | Recipient certificate used to locate the matching RecipientInfo; may be NULL to try all recipients. |
| peer | Optional originator certificate for key-agreement recipients, or NULL. |