Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/crypto/00_crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1131,10 +1131,10 @@ class SubtleCrypto {
* @param {number | null} length
* @returns {Promise<ArrayBuffer>}
*/
async deriveBits(algorithm, baseKey, length) {
async deriveBits(algorithm, baseKey, length = null) {
webidl.assertBranded(this, SubtleCryptoPrototype);
const prefix = "Failed to execute 'deriveBits' on 'SubtleCrypto'";
webidl.requiredArguments(arguments.length, 3, prefix);
webidl.requiredArguments(arguments.length, 2, prefix);
algorithm = webidl.converters.AlgorithmIdentifier(
algorithm,
prefix,
Expand Down
6 changes: 4 additions & 2 deletions tests/wpt/runner/expectation.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,10 +909,12 @@
"historical.any.html": false,
"historical.any.worker.html": false,
"idlharness.https.any.html": [
"Window interface: attribute crypto"
"Window interface: attribute crypto",
"SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)"
],
"idlharness.https.any.worker.html": [
"WorkerGlobalScope interface: attribute crypto"
"WorkerGlobalScope interface: attribute crypto",
"SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)"
],
"import_export": {
"ec_importKey.https.any.html": [
Expand Down