mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Update the Key Usage enum to adapt for PostQuantum Algorithms
This commit is contained in:
parent
b0c48b961e
commit
1d6a64b26c
Notes:
github-actions[bot]
2025-11-27 20:51:29 +00:00
Author: https://github.com/tete17
Commit: 1d6a64b26c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6961
Reviewed-by: https://github.com/gmta ✅
3 changed files with 11 additions and 3 deletions
|
|
@ -365,7 +365,13 @@ JS::ThrowCompletionOr<GC::Ref<WebIDL::Promise>> SubtleCrypto::import_key(Binding
|
|||
|
||||
Variant<ByteBuffer, Bindings::JsonWebKey, Empty> real_key_data;
|
||||
// 2. If format is equal to the string "raw", "pkcs8", or "spki":
|
||||
if (format == Bindings::KeyFormat::Raw || format == Bindings::KeyFormat::Pkcs8 || format == Bindings::KeyFormat::Spki) {
|
||||
if (format == Bindings::KeyFormat::Raw
|
||||
|| format == Bindings::KeyFormat::RawPublic
|
||||
|| format == Bindings::KeyFormat::RawPrivate
|
||||
|| format == Bindings::KeyFormat::RawSeed
|
||||
|| format == Bindings::KeyFormat::RawSecret
|
||||
|| format == Bindings::KeyFormat::Pkcs8
|
||||
|| format == Bindings::KeyFormat::Spki) {
|
||||
// 1. If the keyData parameter passed to the importKey() method is a JsonWebKey dictionary, throw a TypeError.
|
||||
if (key_data.has<Bindings::JsonWebKey>()) {
|
||||
return realm.vm().throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "BufferSource");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue