-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use proper hash when computing message digest in signed attributes (#219
) Per [RFC 5652 § 11.2](https://datatracker.ietf.org/doc/html/rfc5652#section-11.2): "For signed-data, the message digest is computed using the signer's message digest algorithm." Currently, when computing the signed attributes' message digest, `CMS.sign` assumes the digest algorithm is SHA256, which is incorrect. The behavior of `CMS.isValid` is already correct and doesn't need updating. I've made `Digest` conform to `Sequence` to facilitate the conversion/comparison of the message digest. --------- Co-authored-by: Cory Benfield <[email protected]>
- Loading branch information
Showing
3 changed files
with
39 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters