-
Notifications
You must be signed in to change notification settings - Fork 58
fix digest support #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix digest support #118
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -242,9 +242,11 @@ function decryptKeyInfo(doc, options) { | |
| if (keyDigestMethod) { | ||
| const keyDigestMethodAlgorithm = keyDigestMethod.getAttribute('Algorithm'); | ||
| switch (keyDigestMethodAlgorithm) { | ||
| case 'http://www.w3.org/2000/09/xmldsig#sha256': | ||
| case 'http://www.w3.org/2001/04/xmlenc#sha256': | ||
| case 'http://www.w3.org/2000/09/xmldsig#sha256': // backwards compatibility for previous wrong usage | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question about the list of algs above, plus, are there any tests for these?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not adding more at the current time. And there are tests, you can find them here: 36e6993#diff-494628f41cebbf744840def8de0f425815eb3180c035032000913b9f9e95f800R41-R90 |
||
| oaepHash = 'sha256'; | ||
| break; | ||
| case 'http://www.w3.org/2001/04/xmlenc#sha512': | ||
| case 'http://www.w3.org/2000/09/xmldsig#sha512': | ||
| oaepHash = 'sha512'; | ||
| break; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://www.w3.org/TR/xmlenc-core1/#sec-Table-of-Algorithms under Message Digest there is also:
Do we care about those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at the current time.