Skip to content

Add "Signing Time" to PKCS#7 (if customer requires it) #4045

Description

@rrrooommmaaa

If we require at least one authenticated attribute, (e.g. "Signing Time"), we MUST also include "Content Type" and "Message Digest".
As said in https://datatracker.ietf.org/doc/html/rfc5652#section-5.6 ... If the SignedData signerInfo includes
signedAttributes

They are quite easy to add. The forge library shows this example

      authenticatedAttributes: [{
        type: forge.pki.oids.contentType,
        value: forge.pki.oids.data
      }, {
        type: forge.pki.oids.messageDigest
        // value will be auto-populated at signing time
      }, {
        type: forge.pki.oids.signingTime
        // value will be auto-populated at signing time
        //value: new Date('2050-01-01T00:00:00Z')
      }]

forge.pki.oids.data is a constant 1.2.840.113549.1.7.1, other values are placeholders to be filled by the forge library itself.
This task can be postponed if no customer requires it.

Originally posted by @rrrooommmaaa in #3979 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions