Skip to content

CMS routines:CMS_add1_signer:no default digest #117

@nl6720

Description

@nl6720

When using openssl cms to sign a file, it fails with 40E7DCBC0B770000:error:17000080:CMS routines:CMS_add1_signer:no default digest:crypto/cms/cms_sd.c:390:pkey nid=6 unless the -md option is specified.

  1. Create TPM-backed CMS cert & key (I used a script).
  2. Sign a file:
$ echo 1 > testdata
$ openssl cms -sign -provider tpm2 -provider default -propquery '?provider=tpm2' -binary -nocerts -noattr -outform DER -out testdata.cms.sig -in testdata -signer testcert.pem -inkey testkey.pem
40E7DCBC0B770000:error:17000080:CMS routines:CMS_add1_signer:no default digest:crypto/cms/cms_sd.c:390:pkey nid=6

This does not happen with non-TPM keys and the digest algorithm of the key is correctly used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions