GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: update WPT for WebCryptoAPI to ab08796857 · nodejs/node@667c2ce

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/fixtures/wpt
    • README.md
    • WebCryptoAPI
      • generateKey
        • successes.js
      • import_export
        • ec_importKey_failures_fixtures.js
        • importKey_failures.js
    • versions.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/fixtures/wpt/README.md‎

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 numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Last update:
3232
- user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing
3333
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi
3434
- 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
3636
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/a370aad338/webidl/ecmascript-binding/es-exceptions
3737
- webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel
3838
- webstorage: https://github.com/web-platform-tests/wpt/tree/1291340aaa/webstorage
Collapse file

‎test/fixtures/wpt/WebCryptoAPI/generateKey/successes.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/generateKey/successes.js
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function run_test(algorithmNames, slowTest) {
7575
})
7676
.then(async function (result) {
7777
if (resultType === "CryptoKeyPair") {
78-
await Promise.all([
78+
const [jwkPub,,, jwkPriv] = await Promise.all([
7979
subtle.exportKey('jwk', result.publicKey),
8080
subtle.exportKey('spki', result.publicKey),
8181
result.publicKey.algorithm.name.startsWith('RSA') ? undefined : subtle.exportKey('raw', result.publicKey),
@@ -84,6 +84,15 @@ function run_test(algorithmNames, slowTest) {
8484
subtle.exportKey('pkcs8', result.privateKey),
8585
] : [])
8686
]);
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+
}
8796
} else {
8897
if (extractable) {
8998
await Promise.all([
Collapse file

‎test/fixtures/wpt/WebCryptoAPI/import_export/ec_importKey_failures_fixtures.js‎

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 numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function getMismatchedJWKKeyData(algorithm) {
2020
}
2121

2222
function getMismatchedKtyField(algorithm) {
23-
return mismatchedKtyField[algorithm.name];
23+
return mismatchedKtyField[algorithm.namedCurve];
2424
}
2525

2626
function getMismatchedCrvField(algorithm) {
27-
return mismatchedCrvField[algorithm.name];
27+
return mismatchedCrvField[algorithm.namedCurve];
2828
}
2929

3030
var validKeyData = {
Collapse file

‎test/fixtures/wpt/WebCryptoAPI/import_export/importKey_failures.js‎

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 numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function run_test(algorithmNames) {
243243
allAlgorithmSpecifiersFor(name).forEach(function(algorithm) {
244244
getValidKeyData(algorithm).forEach(function(test) {
245245
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};
247247
data.use = "invalid";
248248
var usages = validUsages(vector, 'jwk', test.data);
249249
if (usages.length !== 0)
Collapse file

‎test/fixtures/wpt/versions.json‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/versions.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"path": "wasm/webapi"
8989
},
9090
"WebCryptoAPI": {
91-
"commit": "19d82c57abc7494bdc459a338c5dcfd79e818b4a",
91+
"commit": "ab08796857072c5a93e27e0a25effba2e07dad11",
9292
"path": "WebCryptoAPI"
9393
},
9494
"webidl/ecmascript-binding/es-exceptions": {

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.