[#CMS_RecipientInfo_set0_pkey]
= CMS&lowbar;RecipientInfo&lowbar;set0&lowbar;pkey
:mrdocs:

Transfer ownership of a private key into a key&hyphen;transport RecipientInfo&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CMS&lowbar;RecipientInfo&lowbar;set0&lowbar;pkey(
    xref:CMS_RecipientInfo.adoc[CMS&lowbar;RecipientInfo]* ri,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ri*
| Recipient info of type CMS&lowbar;RECIPINFO&lowbar;TRANS&period;
| *pkey*
| Private key that `ri` will own (or NULL to clear)&semi; previous key is freed&period;
|===


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