-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Node incompatibility for "sha256" algorithm #84
Comments
Is there an older version of node where they were in agreement? If no, it's definitely a bug, and if so, it's a bit trickier to bring it into compliance. |
I tested LTS versions from Node 4 up to Node 18 - and discrepancy seems to be present in all of those versions. |
This package goes back farther than that :-) it’d be good to compare in node 0.10 as well. |
Node 0.10.48 - still same issue:
|
Awesome, thanks for confirming :-) let's fix it then! |
Hello,
there seems to be some differences between this library and Node.js, consider following code:
For
sha256WithRSAEncryption
both Node.js and browserify-sign are correctly signing the text using provided private key, but forsha256
only Node.js is able to sign a text, while browserify-sign` throws an error:From my initial investigation, its because
sha256
algorithm expects only ECDSA key, but we are providing RSA key instead.Is it expected? Since browserify-sign wants to duplicate node behaviour, I think its a bug.
The text was updated successfully, but these errors were encountered: