mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
test: update WPT for WebCryptoAPI to 4ba9d1b8e4
PR-URL: https://github.com/nodejs/node/pull/67686 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
1 parent
63548fb8f0
commit
7e7bd82177
2 files changed
+19
-1
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
// META: title=WebCryptoAPI: importKey rejects a JWK with duplicate key_ops
|
||||
// META: global=window,worker
|
||||
|
||||
'use strict';
|
||||
|
||||
// RFC 7517 section 4.3: "Duplicate key operation values MUST NOT be present".
|
||||
// WebCrypto rejects a key_ops member that is invalid per JWK with DataError.
|
||||
promise_test(async t => {
|
||||
const jwk = {
|
||||
kty: 'oct',
|
||||
k: 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8',
|
||||
alg: 'HS256',
|
||||
key_ops: ['sign', 'verify', 'verify'],
|
||||
};
|
||||
await promise_rejects_dom(t, 'DataError',
|
||||
crypto.subtle.importKey('jwk', jwk, {name: 'HMAC', hash: 'SHA-256'},
|
||||
true, ['sign']));
|
||||
}, 'importKey rejects a JWK whose key_ops has a duplicate');
|
||||
Vendored
+1
-1
@@ -100,7 +100,7 @@
|
||||
"path": "web-locks"
|
||||
},
|
||||
"WebCryptoAPI": {
|
||||
"commit": "e87deca3369c630ca2ade57734c5a42adbbc7e48",
|
||||
"commit": "4ba9d1b8e4b714685cc82e6ed0e432e917d85573",
|
||||
"path": "WebCryptoAPI"
|
||||
},
|
||||
"webidl": {
|
||||
|
||||
Reference in new issue
Block a user