Skip to content

Commit

Permalink
refactor(node,webcrypto): remove unnecessary workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Apr 7, 2021
1 parent ad03597 commit d0a26bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/node/webcrypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getKeyObject(key: CryptoKey, alg?: string, usage?: Set<KeyUsage>
case 'RS384':
case 'RS512':
if (
key.algorithm.name.toUpperCase() !== 'RSASSA-PKCS1-V1_5' || // https://github.com/nodejs/node/pull/38029
key.algorithm.name !== 'RSASSA-PKCS1-v1_5' ||
getHashLength((<RsaHashedKeyAlgorithm>key.algorithm).hash) !== parseInt(alg.substr(2), 10)
) {
throw new TypeError('CryptoKey does not support this operation')
Expand Down

0 comments on commit d0a26bd

Please sign in to comment.