| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,7 @@ Last update: | |||
| 34 | 34 | - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi | |
| 35 | 35 | - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi | |
| 36 | 36 | - web-locks: https://github.com/web-platform-tests/wpt/tree/10a122a6bc/web-locks | |
| 37 | - - WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/19d82c57ab/WebCryptoAPI | ||
| 37 | + - WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/ab08796857/WebCryptoAPI | ||
| 38 | 38 | - webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/2f96fa1996/webidl/ecmascript-binding/es-exceptions | |
| 39 | 39 | - webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel | |
| 40 | 40 | - webstorage: https://github.com/web-platform-tests/wpt/tree/1291340aaa/webstorage | |
| 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([ | |
| 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 = { | |
| 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) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,7 +96,7 @@ | |||
| 96 | 96 | "path": "web-locks" | |
| 97 | 97 | }, | |
| 98 | 98 | "WebCryptoAPI": { | |
| 99 | - "commit": "19d82c57abc7494bdc459a338c5dcfd79e818b4a", | ||
| 99 | + "commit": "ab08796857072c5a93e27e0a25effba2e07dad11", | ||
| 100 | 100 | "path": "WebCryptoAPI" | |
| 101 | 101 | }, | |
| 102 | 102 | "webidl/ecmascript-binding/es-exceptions": { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments