Skip to content

Specify the digest algorithm when sign file with certificate? #1772

Open
@TommyLike

Description

@TommyLike

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions