CMS_RecipientInfo_kari_set0_pkey_and_peer

Associate a private key and optional peer certificate with a key-agreement CMS RecipientInfo.

Synopsis

Declared in <openssl/cms.h>

int
CMS_RecipientInfo_kari_set0_pkey_and_peer(
    CMS_RecipientInfo* ri,
    EVP_PKEY* pk,
    X509* peer);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
riRecipient info that must be of type CMS_RECIPINFO_AGREE.
pkPrivate key used for key agreement; ownership transfers to ri (may be NULL to clear).
peerPeer (originator) certificate used when deriving shared secrets, or NULL when unused.