Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Support for signature verification with RSA/DSA public keys #1166

Closed
wants to merge 1 commit into from

Conversation

mcavage
Copy link

@mcavage mcavage commented Jun 9, 2011

Hey Ryan,

Turns out node didn't support signature verification with anything except for X.509 certificates. This patch takes a guess at inferring whether or not the PEM file passed into crypto.verify() is a public key or certificate, and does the right switch based on that. Minor point I realized after I committed is that sometimes RSA public key headers are just -----BEGIN PUBLIC KEY-----, like DSA, so it's not technically accurate to have the #define C string DSA_KEY_PFX, but, meh.

Thanks,
m

@mcavage
Copy link
Author

mcavage commented Jun 9, 2011

Oh, and we probably want this in both v0.4 and master. Thoughts?

@mcavage
Copy link
Author

mcavage commented Jun 9, 2011

Lastly, I left this code as-is from crypto:

if (r != 1)
ERR_print_errors_fp (stderr);

It would probably make sense to kill that off, since it's not really an error if the signature doesn't match. I can either reprepare a pull request, or if you want to just change it as part of the merge. Let me know.

@ry
Copy link

ry commented Jun 14, 2011

thanks mark - landed in v0.4

please do a new pull for removing error printing.

@ry ry closed this in 88552c5 Jun 14, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants