mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
crypto: fix webcrypto.subtle signature
PR-URL: https://github.com/nodejs/node/pull/41761 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ const {
|
||||
JSONParse,
|
||||
JSONStringify,
|
||||
ObjectDefineProperties,
|
||||
ObjectGetOwnPropertyDescriptor,
|
||||
SafeSet,
|
||||
SymbolToStringTag,
|
||||
StringPrototypeRepeat,
|
||||
@@ -687,7 +688,11 @@ async function decrypt(algorithm, key, data) {
|
||||
class SubtleCrypto {}
|
||||
const subtle = new SubtleCrypto();
|
||||
|
||||
class Crypto {}
|
||||
class Crypto {
|
||||
get subtle() {
|
||||
return subtle;
|
||||
}
|
||||
}
|
||||
const crypto = new Crypto();
|
||||
|
||||
ObjectDefineProperties(
|
||||
@@ -699,9 +704,8 @@ ObjectDefineProperties(
|
||||
value: 'Crypto',
|
||||
},
|
||||
subtle: {
|
||||
...ObjectGetOwnPropertyDescriptor(Crypto.prototype, 'subtle'),
|
||||
enumerable: true,
|
||||
configurable: false,
|
||||
value: subtle,
|
||||
},
|
||||
getRandomValues: {
|
||||
enumerable: true,
|
||||
|
||||
Reference in New Issue
Block a user