GeezerVison is showing github.com — test: update WPT for WebCryptoAPI to ab08796857 · nodejs/node@667c2ce
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/README.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,7 @@ Last update: | 32 | 32 | - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing | 33 | 33 | - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi | 34 | 34 | - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi | 35 | | -- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/19d82c57ab/WebCryptoAPI | | 35 | +- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/ab08796857/WebCryptoAPI | 36 | 36 | - webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/a370aad338/webidl/ecmascript-binding/es-exceptions | 37 | 37 | - webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel | 38 | 38 | - webstorage: https://github.com/web-platform-tests/wpt/tree/1291340aaa/webstorage | |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/generateKey/successes.js +10-1Lines changed: 10 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -75,7 +75,7 @@ function run_test(algorithmNames, slowTest) { | 75 | 75 | }) | 76 | 76 | .then(async function (result) { | 77 | 77 | if (resultType === "CryptoKeyPair") { | 78 | | - await Promise.all([ | | 78 | + const [jwkPub,,, jwkPriv] = await Promise.all([ | 79 | 79 | subtle.exportKey('jwk', result.publicKey), | 80 | 80 | subtle.exportKey('spki', result.publicKey), | 81 | 81 | result.publicKey.algorithm.name.startsWith('RSA') ? undefined : subtle.exportKey('raw', result.publicKey), | @@ -84,6 +84,15 @@ function run_test(algorithmNames, slowTest) { | 84 | 84 | subtle.exportKey('pkcs8', result.privateKey), | 85 | 85 | ] : []) | 86 | 86 | ]); | | 87 | + | | 88 | + if (extractable) { | | 89 | + // Test that the JWK public key is a superset of the JWK private key. | | 90 | + for (const [prop, value] of Object.entries(jwkPub)) { | | 91 | + if (prop !== 'key_ops') { | | 92 | + assert_equals(value, jwkPriv[prop], `Property ${prop} is equal in public and private JWK`); | | 93 | + } | | 94 | + } | | 95 | + } | 87 | 96 | } else { | 88 | 97 | if (extractable) { | 89 | 98 | await Promise.all([ | |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/import_export/ec_importKey_failures_fixtures.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -20,11 +20,11 @@ function getMismatchedJWKKeyData(algorithm) { | 20 | 20 | } | 21 | 21 |
| 22 | 22 | function getMismatchedKtyField(algorithm) { | 23 | | - return mismatchedKtyField[algorithm.name]; | | 23 | + return mismatchedKtyField[algorithm.namedCurve]; | 24 | 24 | } | 25 | 25 |
| 26 | 26 | function getMismatchedCrvField(algorithm) { | 27 | | - return mismatchedCrvField[algorithm.name]; | | 27 | + return mismatchedCrvField[algorithm.namedCurve]; | 28 | 28 | } | 29 | 29 |
| 30 | 30 | var validKeyData = { | |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/import_export/importKey_failures.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -243,7 +243,7 @@ function run_test(algorithmNames) { | 243 | 243 | allAlgorithmSpecifiersFor(name).forEach(function(algorithm) { | 244 | 244 | getValidKeyData(algorithm).forEach(function(test) { | 245 | 245 | if (test.format === "jwk") { | 246 | | - var data = {crv: test.data.crv, kty: test.data.kty, d: test.data.d, x: test.data.x, d: test.data.d}; | | 246 | + var data = {crv: test.data.crv, kty: test.data.kty, d: test.data.d, x: test.data.x, y: test.data.y}; | 247 | 247 | data.use = "invalid"; | 248 | 248 | var usages = validUsages(vector, 'jwk', test.data); | 249 | 249 | if (usages.length !== 0) | |
Collapse file Copy file name to clipboardExpand all lines: test/fixtures/wpt/versions.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 88 | 88 | "path": "wasm/webapi" | 89 | 89 | }, | 90 | 90 | "WebCryptoAPI": { | 91 | | - "commit": "19d82c57abc7494bdc459a338c5dcfd79e818b4a", | | 91 | + "commit": "ab08796857072c5a93e27e0a25effba2e07dad11", | 92 | 92 | "path": "WebCryptoAPI" | 93 | 93 | }, | 94 | 94 | "webidl/ecmascript-binding/es-exceptions": { | |
|