diff options
Diffstat (limited to 'ext/crypto/00_crypto.js')
-rw-r--r-- | ext/crypto/00_crypto.js | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index 69425ae6a..5fdbe6ebc 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -491,14 +491,6 @@ throw new DOMException("Invalid key usages", "SyntaxError"); } - // https://github.com/denoland/deno/pull/9614#issuecomment-866049433 - if (!extractable) { - throw new DOMException( - "Non-extractable keys are not supported", - "SecurityError", - ); - } - switch (normalizedAlgorithm.name) { // https://w3c.github.io/webcrypto/#hmac-operations case "HMAC": { @@ -543,7 +535,7 @@ const key = constructKey( "secret", - true, + extractable, usageIntersection(keyUsages, recognisedUsages), algorithm, handle, @@ -757,14 +749,6 @@ const normalizedAlgorithm = normalizeAlgorithm(algorithm, "generateKey"); - // https://github.com/denoland/deno/pull/9614#issuecomment-866049433 - if (!extractable) { - throw new DOMException( - "Non-extractable keys are not supported", - "SecurityError", - ); - } - const result = await generateKey( normalizedAlgorithm, extractable, |