Open
Description
Code below can be used to sign data with private key and certificate
let cms_signature = CmsContentInfo::sign(
Some(&certificate),
Some(&private_key),
None,
Some(content),
CMSOptions::DETACHED
| CMSOptions::CMS_NOCERTS
| CMSOptions::BINARY
| CMSOptions::NOSMIMECAP,
)?;
Is there any way to specify the digest algorithm when signing?
It's available in the CMS_add1_signer
method of openssl library: 1