Skip to content

Commit

Permalink
use genericized names for openssl signed digests
Browse files Browse the repository at this point in the history
Ref: #8
Ref: #23
Ref: nodejs/node#15024
  • Loading branch information
omsmith committed May 23, 2018
1 parent 95d4732 commit 88068c1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ function createKeySigner(bits) {
if (!bufferOrString(privateKey) && !(typeof privateKey === 'object'))
throw typeError(MSG_INVALID_SIGNER_KEY);
thing = normalizeInput(thing);
// Even though we are specifying "RSA" here, this works with ECDSA
// keys as well.
var signer = crypto.createSign('RSA-SHA' + bits);
var signer = crypto.createSign('SHA' + bits);
var sig = (signer.update(thing), signer.sign(privateKey, 'base64'));
return fromBase64(sig);
}
Expand Down

0 comments on commit 88068c1

Please sign in to comment.