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 a6a0a0292a by nodejs-github-bot · Pull Request #66142 · nodejs/node

test: update WPT for WebCryptoAPI to a6a0a0292a #66142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
nodejs-github-bot merged 1 commit into main from actions/update-WebCryptoAPI-wpt
Sep 22, 2026
+95 −10
Merged

test: update WPT for WebCryptoAPI to a6a0a0292a #66142

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
fc09f06
test: update WPT for WebCryptoAPI to a6a0a0292a
nodejs-github-bot Sep 20, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

1 change: 0 additions & 1 deletion 1 test/fixtures/wpt/WebCryptoAPI/digest/digest.https.any.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
emptyExpected: digestedData[alg].empty,
label: upCase + " with " + size + " source data",
mutations: true,
transferBeforeCall: true,
});
vectors.push({
algorithm: {name: downCase},
Expand Down
11 changes: 3 additions & 8 deletions 11 test/fixtures/wpt/WebCryptoAPI/digest/digest.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,10 @@ function runDigestTests(subtle, sourceData, getVectors) {

promise_test(function () {
var buffer = new Uint8Array(sourceData[size]);
var algorithm = vector.transferBeforeCall
? vector.algorithm
: withNameGetter(vector.algorithm, function () {
buffer.buffer.transfer();
return algorithmName(vector.algorithm);
});
if (vector.transferBeforeCall) {
var algorithm = withNameGetter(vector.algorithm, function () {
buffer.buffer.transfer();
}
return algorithmName(vector.algorithm);
});
return subtle.digest(algorithm, buffer).then(function (result) {
assert_true(
equalBuffers(result, vector.emptyExpected),
Expand Down
53 changes: 53 additions & 0 deletions 53 test/fixtures/wpt/WebCryptoAPI/export-key-error-order.https.any.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// META: title=WebCryptoAPI: exportKey() and wrapKey() check export support first

// HKDF and PBKDF2 are not registered for the export key operation, and their
// keys can only be imported as non-extractable. Both error conditions are
// therefore always true at once, which makes the order observable.
//
// exportKey: step 6 (NotSupportedError) precedes step 7 (InvalidAccessError).
// https://w3c.github.io/webcrypto/#SubtleCrypto-method-exportKey
//
// wrapKey: step 11 (NotSupportedError) precedes step 12 (InvalidAccessError).
// https://w3c.github.io/webcrypto/#SubtleCrypto-method-wrapKey

function importDeriveKey(name) {
return crypto.subtle.importKey('raw', new Uint8Array([]), name, false,
['deriveBits']);
}

function importAesKey(name, usages) {
return crypto.subtle.importKey('raw', new Uint8Array(16), name, false,
usages);
}

for (const name of ['HKDF', 'PBKDF2']) {
promise_test(async (t) => {
const key = await importDeriveKey(name);
return promise_rejects_dom(t, 'NotSupportedError',
crypto.subtle.exportKey('raw', key));
}, `exportKey() with a ${name} key throws NotSupportedError`);

promise_test(async (t) => {
const key = await importDeriveKey(name);
const wrappingKey = await importAesKey('AES-KW', ['wrapKey']);
return promise_rejects_dom(
t, 'NotSupportedError',
crypto.subtle.wrapKey('raw', key, wrappingKey, 'AES-KW'));
}, `wrapKey() with a ${name} key throws NotSupportedError`);
}

// An algorithm that does support the export key operation must still report
// the extractable check.
promise_test(async (t) => {
const key = await importAesKey('AES-CBC', ['encrypt']);
return promise_rejects_dom(t, 'InvalidAccessError',
crypto.subtle.exportKey('raw', key));
}, 'exportKey() with a non-extractable AES-CBC key throws InvalidAccessError');

promise_test(async (t) => {
const key = await importAesKey('AES-CBC', ['encrypt']);
const wrappingKey = await importAesKey('AES-KW', ['wrapKey']);
return promise_rejects_dom(
t, 'InvalidAccessError',
crypto.subtle.wrapKey('raw', key, wrappingKey, 'AES-KW'));
}, 'wrapKey() with a non-extractable AES-CBC key throws InvalidAccessError');
38 changes: 38 additions & 0 deletions 38 test/fixtures/wpt/WebCryptoAPI/sharedarraybuffer.https.any.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// META: title=WebCryptoAPI: BufferSource arguments and members reject shared buffers

// None of the BufferSource arguments of SubtleCrypto, or of the dictionaries it
// takes, are [AllowShared], so a SharedArrayBuffer, or a view onto one, has to
// throw a TypeError.
//
// See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()`.
const sharedBuffer = new WebAssembly.Memory({ shared: true, initial: 1, maximum: 1 }).buffer;

function generateAesGcmKey() {
return crypto.subtle.generateKey({ name: "AES-GCM", length: 128 }, false, ["encrypt"]);
}

for (const [kind, buffer] of [["SharedArrayBuffer", sharedBuffer],
["Uint8Array(SharedArrayBuffer)", new Uint8Array(sharedBuffer)]]) {
promise_test(t => {
return promise_rejects_js(t, TypeError, crypto.subtle.digest("SHA-256", buffer));
}, `digest() data is a ${kind}`);

promise_test(async t => {
const key = await generateAesGcmKey();
await promise_rejects_js(t, TypeError,
crypto.subtle.encrypt({ name: "AES-GCM", iv: new Uint8Array(12) }, key, buffer));
}, `encrypt() data is a ${kind}`);

promise_test(async t => {
const key = await generateAesGcmKey();
await promise_rejects_js(t, TypeError,
crypto.subtle.encrypt({ name: "AES-GCM", iv: buffer }, key, new Uint8Array(1)));
}, `encrypt() AesGcmParams.iv is a ${kind}`);

promise_test(async t => {
const key = await generateAesGcmKey();
await promise_rejects_js(t, TypeError,
crypto.subtle.encrypt({ name: "AES-GCM", iv: new Uint8Array(12), additionalData: buffer },
key, new Uint8Array(1)));
}, `encrypt() AesGcmParams.additionalData is a ${kind}`);
}
2 changes: 1 addition & 1 deletion 2 test/fixtures/wpt/versions.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"path": "web-locks"
},
"WebCryptoAPI": {
"commit": "55ce71bb9deaf4b8a30fe80f95558a10699fb433",
"commit": "a6a0a0292a4706866328488ffaaace00400edcc6",
"path": "WebCryptoAPI"
},
"webidl": {
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — 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.