PKCS7_encrypt_ex

Create a PKCS#7 envelopedData encrypting in for each recipient in certs.

Synopsis

Declared in <openssl/pkcs7.h>

PKCS7*
PKCS7_encrypt_ex(
    stack_st_X509* certs,
    BIO* in,
    EVP_CIPHER const* cipher,
    int flags,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

New PKCS7 envelopedData object, or NULL on error.

Parameters

NameDescription
certsRecipient certificates whose public keys encrypt the content-encryption key.
inBIO supplying the plaintext content.
cipherContent-encryption cipher (for example AES-256-CBC).
flagsPKCS7_* encryption flags.
libctxLibrary context for algorithm fetches, or NULL for the default.
propqProperty query for algorithm fetches, or NULL.