Attach a symmetric key‐encryption key to a KEK RecipientInfo (transfers ownership of key).

Synopsis

Declared in <openssl/cms.h>

int
CMS_RecipientInfo_set0_key(
    CMS_RecipientInfo* ri,
    unsigned char* key,
    size_t keylen);

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

ri

Recipient info of type CMS_RECIPINFO_KEK.

key

Key bytes allocated with OPENSSL_malloc(); ownership transferred to ri (may be NULL to clear).

keylen

Length of key in bytes.

Created with MrDocs