PKCS7_dataDecode

Create a BIO that decrypts/verifies PKCS#7 content for reading.

Synopsis

Declared in <openssl/pkcs7.h>

BIO*
PKCS7_dataDecode(
    PKCS7* p7,
    EVP_PKEY* pkey,
    BIO* in_bio,
    X509* pcert);

Return Value

BIO that yields cleartext content, or NULL on error.

Parameters

NameDescription
p7PKCS#7 EnvelopedData / SignedAndEnvelopedData (or similar) to decode.
pkeyRecipient private key for decryption, or NULL when not required.
in_bioOptional BIO supplying encrypted content when not embedded in p7, or NULL.
pcertRecipient certificate used to select the matching RecipientInfo, or NULL.