CMS_decrypt_set1_pkey

Decrypt CMS recipient key material using a private key, then store it for CMS_decrypt().

Synopsis

Declared in <openssl/cms.h>

int
CMS_decrypt_set1_pkey(
    CMS_ContentInfo* cms,
    EVP_PKEY* pk,
    X509* cert);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
cmsCMS ContentInfo to decrypt; on success stores pk for a later CMS_decrypt() with NULL key arguments.
pkRecipient private key used to unwrap the content-encryption key.
certRecipient certificate used to locate the matching RecipientInfo; may be NULL to try all recipients.