diff --git a/lib/key.js b/lib/key.js index 1fb411b..edc5143 100644 --- a/lib/key.js +++ b/lib/key.js @@ -156,10 +156,7 @@ Key.prototype.createVerify = function (hashAlgo) { var v, nm, err; try { - nm = this.type.toUpperCase() + '-'; - if (this.type === 'ecdsa') - nm = 'ecdsa-with-'; - nm += hashAlgo.toUpperCase(); + nm = hashAlgo.toUpperCase(); v = crypto.createVerify(nm); } catch (e) { err = e; diff --git a/lib/private-key.js b/lib/private-key.js index 7821c48..f80d939 100644 --- a/lib/private-key.js +++ b/lib/private-key.js @@ -148,10 +148,7 @@ PrivateKey.prototype.createSign = function (hashAlgo) { var v, nm, err; try { - nm = this.type.toUpperCase() + '-'; - if (this.type === 'ecdsa') - nm = 'ecdsa-with-'; - nm += hashAlgo.toUpperCase(); + nm = hashAlgo.toUpperCase(); v = crypto.createSign(nm); } catch (e) { err = e;