summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/crypto/00_crypto.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js
index b341aabe7..c3107c288 100644
--- a/ext/crypto/00_crypto.js
+++ b/ext/crypto/00_crypto.js
@@ -491,6 +491,14 @@
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": {