PKCS7_sign_ex

Create a PKCS#7 signed-data structure, with library context and property query.

Synopsis

Declared in <openssl/pkcs7.h>

PKCS7*
PKCS7_sign_ex(
    X509* signcert,
    EVP_PKEY* pkey,
    stack_st_X509* certs,
    BIO* data,
    int flags,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

New PKCS7, or NULL on error; free with PKCS7_free.

Parameters

NameDescription
signcertSigner certificate, or NULL when only adding certs/flags require it.
pkeyPrivate key corresponding to signcert, or NULL for deferred signing.
certsOptional additional certificates to include, or NULL.
dataBIO supplying the content to sign when not using detached/streaming flags.
flagsPKCS7_* flags controlling detached content, streaming, and attributes.
libctxLibrary context for algorithm fetches, or NULL for the default.
propqProperty query for algorithm fetches, or NULL.