-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Description
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