CMS_add1_recipient

Add a recipient certificate and optional originator key material to enveloped CMS.

Synopsis

Declared in <openssl/cms.h>

CMS_RecipientInfo*
CMS_add1_recipient(
    CMS_ContentInfo* cms,
    X509* recip,
    EVP_PKEY* originatorPrivKey,
    X509* originator,
    unsigned int flags);

Return Value

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

Parameters

NameDescription
cmsEnveloped ContentInfo created with CMS_PARTIAL.
recipRecipient certificate to add.
originatorPrivKeyOriginator private key for key-agreement recipients, or NULL when unused.
originatorOriginator certificate corresponding to originatorPrivKey, or NULL when unused.
flagsOptional CMS flags such as CMS_USE_KEYID.