CMS_add1_recipient_cert

Add a KeyTransRecipientInfo for recip to a partial CMS enveloped ContentInfo.

Synopsis

Declared in <openssl/cms.h>

CMS_RecipientInfo*
CMS_add1_recipient_cert(
    CMS_ContentInfo* cms,
    X509* recip,
    unsigned int flags);

Return Value

Internal pointer to the new CMS_RecipientInfo, or NULL on error.

Parameters

NameDescription
cmsEnveloped ContentInfo created with CMS_PARTIAL (for example via CMS_encrypt()).
recipRecipient certificate whose public key wraps the content-encryption key.
flagsOptional CMS flags such as CMS_USE_KEYID.