Create a CMS SignedData structure using a library context.
Declared in <openssl/cms.h>
CMS_ContentInfo*
CMS_sign_ex(
X509* signcert,
EVP_PKEY* pkey,
stack_st_X509* certs,
BIO* data,
unsigned int flags,
OSSL_LIB_CTX* libctx,
char const* propq);
New SignedData ContentInfo, or NULL on error.
| 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. |