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,crypto: update WebCryptoAPI WPT · nodejs/node@bb4aa7a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/fixtures/wpt
    • README.md
    • WebCryptoAPI
      • digest
        • digest.https.any.js
      • generateKey
        • failures.js
      • import_export
        • importKey_failures.js
      • wrapKey_unwrapKey
        • wrapKey_unwrapKey.https.any.js
        • wrapKey_unwrapKey_vectors.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/b81831169b/WebCryptoAPI
35+
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/ecf39b605f/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/9dafa89214/webstorage
Collapse file

‎test/fixtures/wpt/WebCryptoAPI/digest/digest.https.any.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/digest/digest.https.any.js
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,20 @@
118118
});
119119
});
120120

121+
// Call digest() with empty algorithm object
122+
Object.keys(sourceData).forEach(function(size) {
123+
promise_test(function(test) {
124+
var promise = subtle.digest({}, sourceData[size])
125+
.then(function(result) {
126+
assert_unreached("digest() with missing algorithm name should have thrown a TypeError");
127+
}, function(err) {
128+
assert_equals(err.name, "TypeError", "Missing algorithm name should cause TypeError")
129+
});
130+
131+
return promise;
132+
}, "empty algorithm object with " + size);
133+
});
134+
121135

122136
done();
123137

Collapse file

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

Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/generateKey/failures.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ function run_test(algorithmNames) {
166166
});
167167
});
168168

169+
// Empty algorithm should fail with TypeError
170+
allValidUsages(["decrypt", "sign", "deriveBits"], true, []) // Small search space, shouldn't matter because should fail before used
171+
.forEach(function(usages) {
172+
[false, true, "RED", 7].forEach(function(extractable){
173+
testError({}, extractable, usages, "TypeError", "Empty algorithm");
174+
});
175+
});
176+
169177

170178
// Algorithms normalize okay, but usages bad (though not empty).
171179
// It shouldn't matter what other extractable is. Should fail
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
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,19 @@ function run_test(algorithmNames) {
192192
});
193193
});
194194
});
195+
196+
// Missing mandatory "name" field on algorithm
197+
testVectors.forEach(function(vector) {
198+
var name = vector.name;
199+
// We just need *some* valid keydata, so pick the first available algorithm.
200+
var algorithm = allAlgorithmSpecifiersFor(name)[0];
201+
getValidKeyData(algorithm).forEach(function(test) {
202+
validUsages(vector, test.format, test.data).forEach(function(usages) {
203+
[true, false].forEach(function(extractable) {
204+
testError(test.format, {}, test.data, name, usages, extractable, "TypeError", "Missing algorithm name");
205+
});
206+
});
207+
});
208+
});
209+
195210
}
Collapse file

‎test/fixtures/wpt/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any.js
+267-266Lines changed: 267 additions & 266 deletions
Large diffs are not rendered by default.
Collapse file

‎test/fixtures/wpt/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey_vectors.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey_vectors.js
+114Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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": "b81831169b8527a6c569a4ad92cf8a1baf4a7118",
91+
"commit": "ecf39b605f4d2b5d7ef4fe344063c2856c9f105c",
9292
"path": "WebCryptoAPI"
9393
},
9494
"webidl/ecmascript-binding/es-exceptions": {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.