[#PKCS7_sign_ex]
= PKCS7&lowbar;sign&lowbar;ex
:mrdocs:

Create a PKCS&num;7 signed&hyphen;data structure, with library context and property query&period;

== Synopsis

Declared in `&lt;openssl&sol;pkcs7&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:PKCS7.adoc[PKCS7]*
PKCS7&lowbar;sign&lowbar;ex(
    xref:X509.adoc[X509]* signcert,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey,
    xref:stack_st_X509.adoc[stack&lowbar;st&lowbar;X509]* certs,
    xref:BIO.adoc[BIO]* data,
    int flags,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    char const* propq);
----

== Return Value

New PKCS7, or NULL on error&semi; free with PKCS7&lowbar;free&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *signcert*
| Signer certificate, or NULL when only adding certs&sol;flags require it&period;
| *pkey*
| Private key corresponding to `signcert,` or NULL for deferred signing&period;
| *certs*
| Optional additional certificates to include, or NULL&period;
| *data*
| BIO supplying the content to sign when not using detached&sol;streaming flags&period;
| *flags*
| PKCS7&lowbar;&ast; flags controlling detached content, streaming, and attributes&period;
| *libctx*
| Library context for algorithm fetches, or NULL for the default&period;
| *propq*
| Property query for algorithm fetches, or NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
