From 3dd4020139584063b9f019d1cc540e7cfc2e04dd Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Thu, 19 Jan 2023 09:53:36 +0100 Subject: [PATCH] test,crypto: update WebCryptoAPI WPT --- test/fixtures/wpt/README.md | 2 +- .../WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js | 2 +- test/fixtures/wpt/WebCryptoAPI/util/helpers.js | 1 + test/fixtures/wpt/versions.json | 2 +- test/wpt/status/WebCryptoAPI.json | 13 ------------- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 3917bbaf73f741..06b4913a00002c 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -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 diff --git a/test/fixtures/wpt/WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js b/test/fixtures/wpt/WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js index 72566ded62f1f9..bc406f8f0ef78e 100644 --- a/test/fixtures/wpt/WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js +++ b/test/fixtures/wpt/WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js @@ -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], diff --git a/test/fixtures/wpt/WebCryptoAPI/util/helpers.js b/test/fixtures/wpt/WebCryptoAPI/util/helpers.js index 8874f731f8bbcf..ee9d09d1251237 100644 --- a/test/fixtures/wpt/WebCryptoAPI/util/helpers.js +++ b/test/fixtures/wpt/WebCryptoAPI/util/helpers.js @@ -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"); } diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 873f0cc665c710..ec413e0d133e89 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -88,7 +88,7 @@ "path": "wasm/webapi" }, "WebCryptoAPI": { - "commit": "84456654f439f236f3470a36601ecbc4365f50c5", + "commit": "450f829d2567ed9c44bd9b10f7e8f34a2ad15315", "path": "WebCryptoAPI" }, "webidl/ecmascript-binding/es-exceptions": { diff --git a/test/wpt/status/WebCryptoAPI.json b/test/wpt/status/WebCryptoAPI.json index 27d6825a6fa7d5..9f9ba93240be25 100644 --- a/test/wpt/status/WebCryptoAPI.json +++ b/test/wpt/status/WebCryptoAPI.json @@ -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" },