[#CMS_decrypt_set1_pkey_and_peer] = CMS_decrypt_set1_pkey_and_peer :mrdocs: Decrypt CMS EnvelopedData/AuthEnvelopedData recipient key material using a private key and optional peer certificate. == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int CMS_decrypt_set1_pkey_and_peer( xref:CMS_ContentInfo.adoc[CMS_ContentInfo]* cms, xref:EVP_PKEY.adoc[EVP_PKEY]* pk, xref:X509.adoc[X509]* cert, xref:X509.adoc[X509]* peer); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#