Skip to content

Commit

Permalink
Merge pull request #19 from psychobunny/patch-1
Browse files Browse the repository at this point in the history
Fixes unreachable return error
  • Loading branch information
dcousens committed Sep 5, 2015
2 parents 7097997 + ec5fc8c commit bed1c0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ function sign (hash, key, hashType, signType) {
}
return ecSign(hash, priv)
} else if (priv.type === 'dsa') {
return dsaSign(hash, priv, hashType)
if (signType !== 'dsa') {
throw new Error('wrong private key type')
}
return dsaSign(hash, priv, hashType)
} else {
if (signType !== 'rsa') {
throw new Error('wrong private key type')
Expand Down

0 comments on commit bed1c0b

Please sign in to comment.