[#PKCS7_add_recipient]
= PKCS7&lowbar;add&lowbar;recipient
:mrdocs:

Create a recipient info from `x509` and add it to enveloped or signed&hyphen;and&hyphen;enveloped PKCS&num;7 `p7&period;`

== Synopsis

Declared in `&lt;openssl&sol;pkcs7&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:PKCS7_RECIP_INFO.adoc[PKCS7&lowbar;RECIP&lowbar;INFO]*
PKCS7&lowbar;add&lowbar;recipient(
    xref:PKCS7.adoc[PKCS7]* p7,
    xref:X509.adoc[X509]* x509);
----

== Return Value

The new PKCS7&lowbar;RECIP&lowbar;INFO on success, or NULL on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p7*
| PKCS&num;7 EnvelopedData or SignedAndEnvelopedData to update&period;
| *x509*
| Recipient certificate whose public key encrypts the content&hyphen;encryption key&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
