Truly independent web browser
LibWeb: Apply [EnforceRange] to WebCrypto algorithm parameters
Shannon Booth3720af6d2581
diff --git a/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp b/Libraries/LibWeb/Crypto/CryptoAlgorithms.cppindex ef4546f2094..3b0e3f194a6 100644--- a/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp+++ b/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp@@ -412,7 +412,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> AesCtrParams::from_value(Jauto iv = TRY_OR_THROW_OOM(vm, WebIDL::get_buffer_source_copy(iv_value.as_object()));auto length_value = TRY(object.get("length"_utf16_fly_string));- auto length = TRY(length_value.to_u8(vm));+ auto length = TRY(WebIDL::convert_to_int<WebIDL::Octet>(vm, length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));return adopt_own<AlgorithmParams>(*new AesCtrParams { iv, length });}@@ -440,7 +440,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> AesGcmParams::from_value(Jauto maybe_tag_length = Optional<u8> {};if (MUST(object.has_property("tagLength"_utf16_fly_string))) {auto tag_length_value = TRY(object.get("tagLength"_utf16_fly_string));- maybe_tag_length = TRY(tag_length_value.to_u8(vm));+ maybe_tag_length = TRY(WebIDL::convert_to_int<WebIDL::Octet>(vm, tag_length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));}return adopt_own<AlgorithmParams>(*new AesGcmParams { iv, maybe_additional_data, maybe_tag_length });@@ -484,7 +484,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> PBKDF2Params::from_value(Jauto salt = TRY_OR_THROW_OOM(vm, WebIDL::get_buffer_source_copy(salt_value.as_object()));auto iterations_value = TRY(object.get("iterations"_utf16_fly_string));- auto iterations = TRY(iterations_value.to_u32(vm));+ auto iterations = TRY(WebIDL::convert_to_int<WebIDL::UnsignedLong>(vm, iterations_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));auto hash_value = TRY(object.get("hash"_utf16_fly_string));auto hash = TRY(hash_algorithm_identifier_from_value(realm, hash_value));@@ -500,7 +500,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> RsaKeyGenParams::from_valuauto& object = value.as_object();auto modulus_length_value = TRY(object.get("modulusLength"_utf16_fly_string));- auto modulus_length = TRY(modulus_length_value.to_u32(vm));+ auto modulus_length = TRY(WebIDL::convert_to_int<WebIDL::UnsignedLong>(vm, modulus_length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));auto public_exponent_value = TRY(object.get("publicExponent"_utf16_fly_string));GC::Ptr<JS::Uint8Array> public_exponent;@@ -521,7 +521,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> RsaHashedKeyGenParams::froauto& object = value.as_object();auto modulus_length_value = TRY(object.get("modulusLength"_utf16_fly_string));- auto modulus_length = TRY(modulus_length_value.to_u32(vm));+ auto modulus_length = TRY(WebIDL::convert_to_int<WebIDL::UnsignedLong>(vm, modulus_length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));auto public_exponent_value = TRY(object.get("publicExponent"_utf16_fly_string));GC::Ptr<JS::Uint8Array> public_exponent;@@ -578,7 +578,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> RsaPssParams::from_value(Jauto& object = value.as_object();auto salt_length_value = TRY(object.get("saltLength"_utf16_fly_string));- auto salt_length = TRY(salt_length_value.to_u32(vm));+ auto salt_length = TRY(WebIDL::convert_to_int<WebIDL::UnsignedLong>(vm, salt_length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));return adopt_own<AlgorithmParams>(*new RsaPssParams { salt_length });}@@ -616,7 +616,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> AesKeyGenParams::from_valuauto& object = value.as_object();auto length_value = TRY(object.get("length"_utf16_fly_string));- auto length = TRY(length_value.to_u16(vm));+ auto length = TRY(WebIDL::convert_to_int<WebIDL::UnsignedShort>(vm, length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));return adopt_own<AlgorithmParams>(*new AesKeyGenParams { length });}@@ -629,7 +629,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> AesDerivedKeyParams::from_auto& object = value.as_object();auto length_value = TRY(object.get("length"_utf16_fly_string));- auto length = TRY(length_value.to_u16(vm));+ auto length = TRY(WebIDL::convert_to_int<WebIDL::UnsignedShort>(vm, length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));return adopt_own<AlgorithmParams>(*new AesDerivedKeyParams { length });}@@ -672,7 +672,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> HmacImportParams::from_valauto maybe_length = Optional<WebIDL::UnsignedLong> {};if (MUST(object.has_property("length"_utf16_fly_string))) {auto length_value = TRY(object.get("length"_utf16_fly_string));- maybe_length = TRY(length_value.to_u32(vm));+ maybe_length = TRY(WebIDL::convert_to_int<WebIDL::UnsignedLong>(vm, length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));}return adopt_own<AlgorithmParams>(*new HmacImportParams { hash, maybe_length });@@ -691,7 +691,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> HmacKeyGenParams::from_valauto maybe_length = Optional<WebIDL::UnsignedLong> {};if (MUST(object.has_property("length"_utf16_fly_string))) {auto length_value = TRY(object.get("length"_utf16_fly_string));- maybe_length = TRY(length_value.to_u32(vm));+ maybe_length = TRY(WebIDL::convert_to_int<WebIDL::UnsignedLong>(vm, length_value, WebIDL::EnforceRange::Yes, WebIDL::Clamp::No));}return adopt_own<AlgorithmParams>(*new HmacKeyGenParams { hash, maybe_length });diff --git a/Tests/LibWeb/Text/expected/Crypto/SubtleCrypto-algorithm-params-enforce-range.txt b/Tests/LibWeb/Text/expected/Crypto/SubtleCrypto-algorithm-params-enforce-range.txtnew file mode 100644index 00000000000..bdca7800a4e--- /dev/null+++ b/Tests/LibWeb/Text/expected/Crypto/SubtleCrypto-algorithm-params-enforce-range.txt@@ -0,0 +1,6 @@+AesCtrParams length: TypeError+AesGcmParams tagLength: TypeError+Pbkdf2Params iterations: TypeError+AesDerivedKeyParams length: TypeError+HmacImportParams length: TypeError+RsaPssParams saltLength: TypeErrordiff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CBC.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CBC.https.any.txtindex a32b4cecc80..dd085c06ecb 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CBC.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CBC.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 686 tests-618 Pass-68 Fail+686 PassPass Bad usages: generateKey({length: 128, name: AES-CBC}, true, [sign])Pass Bad usages: generateKey({length: 128, name: AES-CBC}, true, [encrypt, sign])Pass Bad usages: generateKey({length: 128, name: AES-CBC}, true, [decrypt, encrypt, sign])@@ -616,74 +615,74 @@ Pass Bad algorithm property: generateKey({length: 512, name: AES-CBC}, false, []Pass Bad algorithm property: generateKey({length: 512, name: AES-CBC}, true, [])Pass Bad algorithm property: generateKey({length: 512, name: AES-CBC}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Bad algorithm property: generateKey({length: 512, name: AES-CBC}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CBC}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CBC}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Empty usages: generateKey({length: 128, name: AES-CBC}, false, [])Pass Empty usages: generateKey({length: 128, name: AES-CBC}, true, [])Pass Empty usages: generateKey({length: 192, name: AES-CBC}, false, [])diff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CTR.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CTR.https.any.txtindex cdf5317111e..48452823906 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CTR.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-CTR.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 686 tests-618 Pass-68 Fail+686 PassPass Bad usages: generateKey({length: 128, name: AES-CTR}, true, [sign])Pass Bad usages: generateKey({length: 128, name: AES-CTR}, true, [encrypt, sign])Pass Bad usages: generateKey({length: 128, name: AES-CTR}, true, [decrypt, encrypt, sign])@@ -616,74 +615,74 @@ Pass Bad algorithm property: generateKey({length: 512, name: AES-CTR}, false, []Pass Bad algorithm property: generateKey({length: 512, name: AES-CTR}, true, [])Pass Bad algorithm property: generateKey({length: 512, name: AES-CTR}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Bad algorithm property: generateKey({length: 512, name: AES-CTR}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-CTR}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-CTR}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Empty usages: generateKey({length: 128, name: AES-CTR}, false, [])Pass Empty usages: generateKey({length: 128, name: AES-CTR}, true, [])Pass Empty usages: generateKey({length: 192, name: AES-CTR}, false, [])diff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-GCM.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-GCM.https.any.txtindex e4e0e7bf641..87ee2bd6cf0 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-GCM.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-GCM.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 686 tests-618 Pass-68 Fail+686 PassPass Bad usages: generateKey({length: 128, name: AES-GCM}, true, [sign])Pass Bad usages: generateKey({length: 128, name: AES-GCM}, true, [encrypt, sign])Pass Bad usages: generateKey({length: 128, name: AES-GCM}, true, [decrypt, encrypt, sign])@@ -616,74 +615,74 @@ Pass Bad algorithm property: generateKey({length: 512, name: AES-GCM}, false, []Pass Bad algorithm property: generateKey({length: 512, name: AES-GCM}, true, [])Pass Bad algorithm property: generateKey({length: 512, name: AES-GCM}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Bad algorithm property: generateKey({length: 512, name: AES-GCM}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-GCM}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, false, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-GCM}, true, [encrypt, decrypt, wrapKey, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Empty usages: generateKey({length: 128, name: AES-GCM}, false, [])Pass Empty usages: generateKey({length: 128, name: AES-GCM}, true, [])Pass Empty usages: generateKey({length: 192, name: AES-GCM}, false, [])diff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-KW.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-KW.https.any.txtindex f56b25d6c35..91474033b4f 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-KW.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_AES-KW.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 236 tests-216 Pass-20 Fail+236 PassPass Bad usages: generateKey({length: 128, name: AES-KW}, true, [encrypt])Pass Bad usages: generateKey({length: 128, name: AES-KW}, true, [wrapKey, encrypt])Pass Bad usages: generateKey({length: 128, name: AES-KW}, true, [unwrapKey, wrapKey, encrypt])@@ -214,26 +213,26 @@ Pass Bad algorithm property: generateKey({length: 512, name: AES-KW}, false, [])Pass Bad algorithm property: generateKey({length: 512, name: AES-KW}, true, [])Pass Bad algorithm property: generateKey({length: 512, name: AES-KW}, false, [wrapKey, unwrapKey, wrapKey, unwrapKey])Pass Bad algorithm property: generateKey({length: 512, name: AES-KW}, true, [wrapKey, unwrapKey, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [wrapKey, unwrapKey, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [wrapKey, unwrapKey, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [wrapKey, unwrapKey, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [wrapKey, unwrapKey, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, false, [wrapKey, unwrapKey, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: 4294967424, name: AES-KW}, true, [wrapKey, unwrapKey, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, false, [wrapKey, unwrapKey, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({length: -4294967168, name: AES-KW}, true, [wrapKey, unwrapKey, wrapKey, unwrapKey])Pass Empty usages: generateKey({length: 128, name: AES-KW}, false, [])Pass Empty usages: generateKey({length: 128, name: AES-KW}, true, [])Pass Empty usages: generateKey({length: 192, name: AES-KW}, false, [])diff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_HMAC.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_HMAC.https.any.txtindex 4104f2c05f6..49cc33923e6 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_HMAC.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_HMAC.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 436 tests-416 Pass-20 Fail+436 PassPass Bad usages: generateKey({hash: SHA-1, length: 160, name: HMAC}, true, [encrypt])Pass Bad usages: generateKey({hash: SHA-1, length: 160, name: HMAC}, true, [sign, encrypt])Pass Bad usages: generateKey({hash: SHA-1, length: 160, name: HMAC}, true, [verify, sign, encrypt])@@ -404,26 +403,26 @@ Pass Bad usages: generateKey({hash: SHA-512, name: HMAC}, true, [sign, decapsulaPass Bad usages: generateKey({hash: SHA-512, name: HMAC}, true, [verify, sign, decapsulateBits])Pass Bad usages: generateKey({hash: SHA-512, name: HMAC}, true, [verify, decapsulateBits])Pass Bad usages: generateKey({hash: SHA-512, name: HMAC}, true, [sign, verify, sign, verify, decapsulateBits])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [sign, verify, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [sign, verify, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [sign, verify, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [sign, verify, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, false, [sign, verify, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: 4294967424, name: HMAC}, true, [sign, verify, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, false, [sign, verify, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, length: -4294967168, name: HMAC}, true, [sign, verify, sign, verify])Pass Empty usages: generateKey({hash: SHA-1, length: 160, name: HMAC}, false, [])Pass Empty usages: generateKey({hash: SHA-1, length: 160, name: HMAC}, true, [])Pass Empty usages: generateKey({hash: SHA-256, length: 256, name: HMAC}, false, [])diff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-OAEP.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-OAEP.https.any.txtindex d82ed0839de..43b784f4f0f 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-OAEP.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-OAEP.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 340 tests-284 Pass-56 Fail+340 PassPass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])Pass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt, encrypt, sign])Pass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt, encrypt, sign])@@ -284,62 +283,62 @@ Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, naPass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 0}}, true, [])Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 0}}, false, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 0}}, true, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, encrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, encrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, decrypt])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey, wrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [encrypt, decrypt, wrapKey, unwrapKey, decrypt, unwrapKey, encrypt, decrypt, wrapKey, unwrapKey])Pass Empty usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])Pass Empty usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])Pass Empty usages: generateKey({hash: SHA-256, modulusLength: 2048, name: RSA-OAEP, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])diff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.txtindex d914675c49d..0b525dcc991 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSA-PSS.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 116 tests-100 Pass-16 Fail+116 PassPass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [encrypt])Pass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, encrypt])Pass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign, encrypt])@@ -100,22 +99,22 @@ Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, naPass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 0}}, true, [])Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 0}}, false, [sign, verify, sign, sign, verify])Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 0}}, true, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])Pass Empty usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])Pass Empty usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])Pass Empty usages: generateKey({hash: SHA-256, modulusLength: 2048, name: RSA-PSS, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])diff --git a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.https.any.txt b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.https.any.txtindex 59cb24c73a8..0d694368af6 100644--- a/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.https.any.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.https.any.txt@@ -2,8 +2,7 @@ Harness status: OKFound 116 tests-100 Pass-16 Fail+116 PassPass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [encrypt])Pass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, encrypt])Pass Bad usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign, encrypt])@@ -100,22 +99,22 @@ Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, naPass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 0}}, true, [])Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 0}}, false, [sign, verify, sign, sign, verify])Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 1024, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 0}}, true, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])-Fail Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: 4294968320, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [verify, sign])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [sign, verify, sign, sign, verify])+Pass Bad algorithm property: generateKey({hash: SHA-256, modulusLength: -4294966272, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [sign, verify, sign, sign, verify])Pass Empty usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])Pass Empty usages: generateKey({hash: SHA-1, modulusLength: 2048, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, true, [])Pass Empty usages: generateKey({hash: SHA-256, modulusLength: 2048, name: RSASSA-PKCS1-v1_5, publicExponent: {0: 1, 1: 0, 2: 1}}, false, [])diff --git a/Tests/LibWeb/Text/input/Crypto/SubtleCrypto-algorithm-params-enforce-range.html b/Tests/LibWeb/Text/input/Crypto/SubtleCrypto-algorithm-params-enforce-range.htmlnew file mode 100644index 00000000000..4f15bf909da--- /dev/null+++ b/Tests/LibWeb/Text/input/Crypto/SubtleCrypto-algorithm-params-enforce-range.html@@ -0,0 +1,31 @@+<!doctype html>+<script src="../include.js"></script>+<script>+ promiseTest(async () => {+ async function check(label, promise) {+ try {+ await promise;+ println(`${label}: ok`);+ } catch (error) {+ println(`${label}: ${error.name}`);+ }+ }++ const data = new Uint8Array(16);++ const aesCtrKey = await crypto.subtle.importKey("raw", data, "AES-CTR", false, ["encrypt"]);+ await check("AesCtrParams length", crypto.subtle.encrypt({ name: "AES-CTR", counter: new Uint8Array(16), length: 2 ** 8 + 64 }, aesCtrKey, data));++ const aesGcmKey = await crypto.subtle.importKey("raw", data, "AES-GCM", false, ["encrypt"]);+ await check("AesGcmParams tagLength", crypto.subtle.encrypt({ name: "AES-GCM", iv: new Uint8Array(12), tagLength: 2 ** 8 + 128 }, aesGcmKey, data));++ const pbkdf2Key = await crypto.subtle.importKey("raw", data, "PBKDF2", false, ["deriveBits", "deriveKey"]);+ await check("Pbkdf2Params iterations", crypto.subtle.deriveBits({ name: "PBKDF2", salt: data, iterations: 2 ** 32 + 1, hash: "SHA-256" }, pbkdf2Key, 256));+ await check("AesDerivedKeyParams length", crypto.subtle.deriveKey({ name: "PBKDF2", salt: data, iterations: 1, hash: "SHA-256" }, pbkdf2Key, { name: "AES-GCM", length: 2 ** 16 + 128 }, false, ["encrypt"]));++ await check("HmacImportParams length", crypto.subtle.importKey("raw", data, { name: "HMAC", hash: "SHA-256", length: 2 ** 32 + 128 }, false, ["sign"]));++ const rsaPssKey = await crypto.subtle.generateKey({ name: "RSA-PSS", modulusLength: 1024, publicExponent: new Uint8Array([1, 0, 1]), hash: "SHA-256" }, false, ["sign"]);+ await check("RsaPssParams saltLength", crypto.subtle.sign({ name: "RSA-PSS", saltLength: 2 ** 32 + 32 }, rsaPssKey.privateKey, data));+ });+</script>