[#CMS_add0_recipient_key] = CMS_add0_recipient_key :mrdocs: Add a KEKRecipientInfo that wraps the content‐encryption key with a symmetric KEK. == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CMS_RecipientInfo.adoc[CMS_RecipientInfo]* CMS_add0_recipient_key( xref:CMS_ContentInfo.adoc[CMS_ContentInfo]* cms, int nid, unsigned char* key, size_t keylen, unsigned char* id, size_t idlen, xref:ASN1_GENERALIZEDTIME.adoc[ASN1_GENERALIZEDTIME]* date, xref:ASN1_OBJECT.adoc[ASN1_OBJECT]* otherTypeId, xref:ASN1_TYPE.adoc[ASN1_TYPE]* otherType); ---- == Return Value Internal pointer to the new CMS_RecipientInfo, or NULL on error. == Parameters [cols="1,4"] |=== | Name| Description | *cms* | Enveloped ContentInfo created with CMS_PARTIAL. | *nid* | Key‐wrap algorithm NID (AES wrap NIDs, or NID_undef to choose from `keylen).` | *key* | Symmetric key‐encryption key; ownership transfers to `cms.` | *keylen* | Length of `key` in octets. | *id* | Key identifier bytes; ownership transfers to `cms.` | *idlen* | Length of `id` in octets. | *date* | Optional key validity date, or NULL. | *otherTypeId* | Optional otherKeyAttribute type OID, or NULL. | *otherType* | Optional otherKeyAttribute value, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#