[#CMS_add1_recipient]
= CMS&lowbar;add1&lowbar;recipient
:mrdocs:

Add a recipient certificate and optional originator key material to enveloped CMS&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CMS_RecipientInfo.adoc[CMS&lowbar;RecipientInfo]*
CMS&lowbar;add1&lowbar;recipient(
    xref:CMS_ContentInfo.adoc[CMS&lowbar;ContentInfo]* cms,
    xref:X509.adoc[X509]* recip,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* originatorPrivKey,
    xref:X509.adoc[X509]* originator,
    unsigned int flags);
----

== Return Value

Internal pointer to the new CMS&lowbar;RecipientInfo, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cms*
| Enveloped ContentInfo created with CMS&lowbar;PARTIAL&period;
| *recip*
| Recipient certificate to add&period;
| *originatorPrivKey*
| Originator private key for key&hyphen;agreement recipients, or NULL when unused&period;
| *originator*
| Originator certificate corresponding to `originatorPrivKey,` or NULL when unused&period;
| *flags*
| Optional CMS flags such as CMS&lowbar;USE&lowbar;KEYID&period;
|===


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