Create a PKCS#7 signed-data structure using the default library context.
Declared in <openssl/pkcs7.h>
PKCS7*
PKCS7_sign(
X509* signcert,
EVP_PKEY* pkey,
stack_st_X509* certs,
BIO* data,
int flags);
New PKCS7, or NULL on error; free with PKCS7_free.
| Name | Description |
|---|---|
| signcert | Signer certificate, or NULL when only adding certs/flags require it. |
| pkey | Private key corresponding to signcert, or NULL for deferred signing. |
| certs | Optional additional certificates to include, or NULL. |
| data | BIO supplying the content to sign when not using detached/streaming flags. |
| flags | PKCS7_* flags controlling detached content, streaming, and attributes. |