Add a signer certificate and private key to a CMS SignedData ContentInfo.
Declared in <openssl/cms.h>
CMS_SignerInfo*
CMS_add1_signer(
CMS_ContentInfo* cms,
X509* signer,
EVP_PKEY* pk,
EVP_MD const* md,
unsigned int flags);
Unless CMS_REUSE_DIGEST is set, the ContentInfo is incomplete until finalized by streaming or CMS_final().
The new CMS_SignerInfo on success, or NULL on error.
| Name | Description |
|---|---|
| cms | CMS_ContentInfo that must already be SignedData (for example from CMS_sign() with CMS_PARTIAL). |
| signer | Signer certificate. |
| pk | Private key corresponding to signer. |
| md | Message digest to use, or NULL to select the default digest for the key algorithm. |
| flags | CMS_* option flags controlling digest reuse, attributes, and finalization. |