Skip to content

openssl cms -resign dosn't work properly #8923

@scampa65

Description

@scampa65

When I use the cms command with the switch -resign to add another signature to a signed file, the content-type attribute is non present on the added signature. This is an error because the rfc 5652 par 11.1 (Content Type) require that "The content-type attribute type MUST be present whenever signed attributes are present in signed-data".
The problem is always reproducible and is detected, for example, from Bouncycastle.
The commands I've executed are:

$ openssl cms -sign -binary -nodetach -stream -nosmimecap -md SHA256 -signer keysig_1.pem -passin pass:12345678 -in hello.txt -outform DER -out hello111.txt.p7m
$ openssl cms -resign -binary -nodetach -nosmimecap -md SHA256 -signer keysig_2.pem -passin pass:12345678 -inform DER -in hello111.txt.p7m -outform DER -out hello111.txt.p7m.p7m

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