-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
update sha* alg definitions #40
Conversation
ok so the key test would be one that
|
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.
I updated the tests to run the same fixtures for each equivalent algorithm. Let me know if you'd like me to take a different approach / change less, or provide a separate reproduction showing the behaviour.
|
||
t.ok(nCrypto.createVerify(f.scheme).update(message).verify(pub, nSig), 'node validate node sig') | ||
t.ok(nCrypto.createVerify(f.scheme).update(message).verify(pub, bSig), 'node validate browser sig') | ||
t.equals(nSig.toString('hex'), f.signature, 'node compare to known') |
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.
Tests were failing before I added the id/tag to the other definitions, so I added this as a sanity check. This was consistently "OK", meaning node was doing the expected thing.
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.
ok this is a good check
"hash": "sha256", | ||
"id": "" | ||
"id": "3031300d060960864801650304020105000420" |
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.
Added these to get RSA going, which is the only thing it impacts (as I'm sure you know). Although, it is a little weird to do
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.
yeah this file was just set up before I latter learned how weird some of the names were handled in node
Working on updating the test fixtures to codify it, but do believe these should all support both ecdsa and rsa. Should be the "correct" ones to use vs the "RSA-SHA*" aliases.
Ref: auth0/node-jwa#26