Skip to content

Commit

Permalink
test,crypto: update WebCryptoAPI WPT
Browse files Browse the repository at this point in the history
PR-URL: #46267
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
panva authored Jan 21, 2023
1 parent 5ccf4ef commit 95466de
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Last update:
- user-timing: https://github.com/web-platform-tests/wpt/tree/df24fb604e/user-timing
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/d8dbe6990b/wasm/jsapi
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/84456654f4/WebCryptoAPI
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/450f829d25/WebCryptoAPI
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/a370aad338/webidl/ecmascript-binding/es-exceptions

[Web Platform Tests]: https://github.com/web-platform-tests/wpt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function getTestVectors() {
var failing = [];
keyLengths.forEach(function(keyLength) {
// First, make some tests for bad tag lengths
[24, 48, 72, 95, 129, 256].forEach(function(badTagLength) {
[24, 48, 72, 95, 129].forEach(function(badTagLength) {
failing.push({
name: "AES-GCM " + keyLength.toString() + "-bit key, illegal tag length " + badTagLength.toString() + "-bits",
keyBuffer: keyBytes[keyLength],
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/wpt/WebCryptoAPI/util/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function assert_goodCryptoKey(key, algorithm, extractable, usages, kind) {
assert_in_array(usage, correctUsages, "Has " + usage + " usage");
});
assert_equals(key.usages.length, usageCount, "usages property is correct");
assert_equals(key[Symbol.toStringTag], 'CryptoKey', "has the expected Symbol.toStringTag");
}


Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"path": "wasm/webapi"
},
"WebCryptoAPI": {
"commit": "84456654f439f236f3470a36601ecbc4365f50c5",
"commit": "450f829d2567ed9c44bd9b10f7e8f34a2ad15315",
"path": "WebCryptoAPI"
},
"webidl/ecmascript-binding/es-exceptions": {
Expand Down
13 changes: 0 additions & 13 deletions test/wpt/status/WebCryptoAPI.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
{
"encrypt_decrypt/aes_gcm.https.any.js": {
"fail": {
"note": "We're throwing correct error for the WebIDL definition, WPT needs update: https://github.com/web-platform-tests/wpt/pull/37734",
"expected": [
"AES-GCM 128-bit key, illegal tag length 256-bits",
"AES-GCM 192-bit key, illegal tag length 256-bits",
"AES-GCM 256-bit key, illegal tag length 256-bits",
"AES-GCM 128-bit key, illegal tag length 256-bits decryption",
"AES-GCM 192-bit key, illegal tag length 256-bits decryption",
"AES-GCM 256-bit key, illegal tag length 256-bits decryption"
]
}
},
"algorithm-discards-context.https.window.js": {
"skip": "Not relevant in Node.js context"
},
Expand Down

0 comments on commit 95466de

Please sign in to comment.