Skip to content

Commit 131e029

Browse files
authored
Merge pull request #26 from omsmith/use-generic-openssl-signature-name
use genericized names for openssl signed digests
2 parents 95d4732 + 0bdf973 commit 131e029

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ function createKeySigner(bits) {
7070
if (!bufferOrString(privateKey) && !(typeof privateKey === 'object'))
7171
throw typeError(MSG_INVALID_SIGNER_KEY);
7272
thing = normalizeInput(thing);
73-
// Even though we are specifying "RSA" here, this works with ECDSA
74-
// keys as well.
75-
var signer = crypto.createSign('RSA-SHA' + bits);
73+
var signer = crypto.createSign('SHA' + bits);
7674
var sig = (signer.update(thing), signer.sign(privateKey, 'base64'));
7775
return fromBase64(sig);
7876
}

0 commit comments

Comments
 (0)