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

Name

Description

cms

Enveloped ContentInfo created with CMS_PARTIAL.

recip

Recipient certificate to add.

originatorPrivKey

Originator private key for key‐agreement recipients, or NULL when unused.

originator

Originator certificate corresponding to originatorPrivKey, or NULL when unused.

flags

Optional CMS flags such as CMS_USE_KEYID.

Created with MrDocs