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.
Support for signature verification with RSA/DSA public keys
Oh, and we probably want this in both v0.4 and master. Thoughts?
Lastly, I left this code as-is from crypto:
if (r != 1)
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.
thanks mark - landed in v0.4
please do a new pull for removing error printing.