Add a KEKRecipientInfo that wraps the content‐encryption key with a symmetric KEK.
Synopsis
Declared in <openssl/cms.h>
CMS_RecipientInfo*
CMS_add0_recipient_key(
CMS_ContentInfo* cms,
int nid,
unsigned char* key,
size_t keylen,
unsigned char* id,
size_t idlen,
ASN1_GENERALIZEDTIME* date,
ASN1_OBJECT* otherTypeId,
ASN1_TYPE* otherType);
Return Value
Internal pointer to the new CMS_RecipientInfo, or NULL on error.
Parameters
Name |
Description |
cms |
Enveloped ContentInfo created with CMS_PARTIAL. |
nid |
Key‐wrap algorithm NID (AES wrap NIDs, or NID_undef to choose from |
key |
Symmetric key‐encryption key; ownership transfers to |
keylen |
Length of |
id |
Key identifier bytes; ownership transfers to |
idlen |
Length of |
date |
Optional key validity date, or NULL. |
otherTypeId |
Optional otherKeyAttribute type OID, or NULL. |
otherType |
Optional otherKeyAttribute value, or NULL. |
Created with MrDocs