Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Crypto: getHashes shouldn't return hashes that are not supported. #7282

Closed
KenanSulayman opened this Issue · 3 comments

2 participants

Kenan Sulayman Fedor Indutny
Kenan Sulayman

crypto.getHashes shouldn't return hash functions that can't be used as digest methods.

Example (OSX 10.9.3, OpenSSL 0.9.8y 5 Feb 2013):

> crypto.createHash("rsa-sha512")
Error: Digest method not supported

Note: rsa-sha512 is listed by the crypto.getHashes() array.

Fedor Indutny
Owner

Yeah, this is a kind of problem that we are aware of. crypto.getHashes() transforms everything to lowercase. If you would try RSA-SHA512 it will most likely work just fine.

Kenan Sulayman

Yup, that does indeed do the job. :+1: I won't close this issue just now, just as a kind reminder.

Fedor Indutny indutny referenced this issue from a commit in indutny/node
Fedor Indutny indutny crypto: do not lowercase cipher/hash names
`crypto.getCiphers()` and `crypto.getHashes()` should prefer lower-case
variants of names, but should not introduce them.

fix #7282
68ac5f4
Fedor Indutny
Owner

Should be fixed by #7284

Fedor Indutny indutny closed this issue from a commit
Fedor Indutny indutny crypto: do not lowercase cipher/hash names
`crypto.getCiphers()` and `crypto.getHashes()` should prefer lower-case
variants of names, but should not introduce them.

fix #7282
f0d8705
Fedor Indutny indutny closed this in f0d8705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.