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

Closed
KenanSulayman opened this Issue Mar 9, 2014 · 3 comments

2 participants

@KenanSulayman

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.

@indutny
Node.js Foundation member

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.

@KenanSulayman

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

@indutny indutny added a commit to indutny/node that referenced this issue Mar 10, 2014
@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
@indutny
Node.js Foundation member

Should be fixed by #7284

@indutny indutny added a commit that closed this issue Mar 10, 2014
@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
@indutny indutny closed this in f0d8705 Mar 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment