From 22eec2b3cfcb0341e1b28329dbf82a40e66a672a Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Fri, 22 Mar 2024 18:56:36 +0530 Subject: [PATCH] fix(ext/node): add crypto.subtle (#23027) Alias for `crypto.webcrypto.subtle`. https://nodejs.org/api/crypto.html#cryptosubtle --- ext/node/polyfills/crypto.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/node/polyfills/crypto.ts b/ext/node/polyfills/crypto.ts index db2e5c243e..908d21b006 100644 --- a/ext/node/polyfills/crypto.ts +++ b/ext/node/polyfills/crypto.ts @@ -162,6 +162,7 @@ import type { } from "ext:deno_node/_stream.d.ts"; import { crypto as webcrypto } from "ext:deno_crypto/00_crypto.js"; +const subtle = webcrypto.subtle; const fipsForced = getOptionValue("--force-fips"); function getRandomValues(typedArray) { @@ -377,6 +378,7 @@ export default { Verify, verify, webcrypto, + subtle, X509Certificate, }; @@ -511,6 +513,7 @@ export { setFips, Sign, sign, + subtle, timingSafeEqual, Verify, verify,