CMS_RecipientInfo_set0_key

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

NameDescription
riRecipient info of type CMS_RECIPINFO_KEK.
keyKey bytes allocated with OPENSSL_malloc(); ownership transferred to ri (may be NULL to clear).
keylenLength of key in bytes.