CMS_decrypt_set1_key

Install a KEKRecipientInfo key on a CMS ContentInfo so CMS_decrypt can use it.

Synopsis

Declared in <openssl/cms.h>

int
CMS_decrypt_set1_key(
    CMS_ContentInfo* cms,
    unsigned char* key,
    size_t keylen,
    unsigned char const* id,
    size_t idlen);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
cmsEnveloped ContentInfo that contains a KEK recipient.
keySymmetric key-encryption key octets.
keylenLength of key in bytes.
idOptional key identifier matching the recipient's keyEncryptionKeyIdentifier, or NULL.
idlenLength of id in bytes when id is non-NULL.