Decrypt a PKCS#7 envelopedData (or signed-and-enveloped) structure for a recipient.
Declared in <openssl/pkcs7.h>
int
PKCS7_decrypt(
PKCS7* p7,
EVP_PKEY* pkey,
X509* cert,
BIO* data,
int flags);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| p7 | Enveloped PKCS#7 object to decrypt. |
| pkey | Recipient private key matching a RecipientInfo in p7. |
| cert | Recipient certificate used to select the matching RecipientInfo, or NULL. |
| data | BIO that receives the decrypted content. |
| flags | PKCS7_* decryption flags (for example PKCS7_TEXT). |