[#CMS_sign_ex] = CMS_sign_ex :mrdocs: Create a CMS SignedData structure using a library context. == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CMS_ContentInfo.adoc[CMS_ContentInfo]* CMS_sign_ex( xref:X509.adoc[X509]* signcert, xref:EVP_PKEY.adoc[EVP_PKEY]* pkey, xref:stack_st_X509.adoc[stack_st_X509]* certs, xref:BIO.adoc[BIO]* data, unsigned int flags, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* libctx, char const* propq); ---- == Return Value New SignedData ContentInfo, or NULL on error. == Parameters [cols="1,4"] |=== | Name| Description | *signcert* | Signer certificate corresponding to `pkey,` or NULL for certificates‐only. | *pkey* | Signer private key, or NULL when only embedding certificates. | *certs* | Optional intermediate certificates to include, or NULL. | *data* | Content BIO to sign (read fully unless CMS_STREAM / CMS_PARTIAL flags apply). | *flags* | CMS signing flags (for example CMS_DETACHED, CMS_BINARY). | *libctx* | Library context for algorithm fetches, or NULL for the default. | *propq* | Property query for provider selection, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#