diff --git a/Libraries/LibWeb/Crypto/SubtleCrypto.cpp b/Libraries/LibWeb/Crypto/SubtleCrypto.cpp index 3dedf811fa0..f904e7f4203 100644 --- a/Libraries/LibWeb/Crypto/SubtleCrypto.cpp +++ b/Libraries/LibWeb/Crypto/SubtleCrypto.cpp @@ -295,7 +295,7 @@ GC::Ref SubtleCrypto::digest(AlgorithmIdentifier const& algorit } // https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-generateKey -JS::ThrowCompletionOr> SubtleCrypto::generate_key(AlgorithmIdentifier algorithm, bool extractable, Vector key_usages) +GC::Ref SubtleCrypto::generate_key(AlgorithmIdentifier algorithm, bool extractable, Vector key_usages) { auto& realm = this->realm(); @@ -431,7 +431,7 @@ JS::ThrowCompletionOr> SubtleCrypto::import_key(Binding } // https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-exportKey -JS::ThrowCompletionOr> SubtleCrypto::export_key(Bindings::KeyFormat format, GC::Ref key) +GC::Ref SubtleCrypto::export_key(Bindings::KeyFormat format, GC::Ref key) { auto& realm = this->realm(); // 1. Let format and key be the format and key parameters passed to the exportKey() method, respectively. @@ -477,7 +477,7 @@ JS::ThrowCompletionOr> SubtleCrypto::export_key(Binding } // https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-sign -JS::ThrowCompletionOr> SubtleCrypto::sign(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& data_parameter) +GC::Ref SubtleCrypto::sign(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& data_parameter) { auto& realm = this->realm(); auto& vm = this->vm(); @@ -534,7 +534,7 @@ JS::ThrowCompletionOr> SubtleCrypto::sign(AlgorithmIden } // https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-verify -JS::ThrowCompletionOr> SubtleCrypto::verify(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& signature_data, GC::Root const& data_parameter) +GC::Ref SubtleCrypto::verify(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& signature_data, GC::Root const& data_parameter) { auto& realm = this->realm(); auto& vm = this->vm(); @@ -598,7 +598,7 @@ JS::ThrowCompletionOr> SubtleCrypto::verify(AlgorithmId } // https://w3c.github.io/webcrypto/#SubtleCrypto-method-deriveBits -JS::ThrowCompletionOr> SubtleCrypto::derive_bits(AlgorithmIdentifier algorithm, GC::Ref base_key, Optional length_optional) +GC::Ref SubtleCrypto::derive_bits(AlgorithmIdentifier algorithm, GC::Ref base_key, Optional length_optional) { auto& realm = this->realm(); // 1. Let algorithm, baseKey and length, be the algorithm, baseKey and length parameters passed to the deriveBits() method, respectively. @@ -645,7 +645,7 @@ JS::ThrowCompletionOr> SubtleCrypto::derive_bits(Algori } // https://w3c.github.io/webcrypto/#SubtleCrypto-method-deriveKey -JS::ThrowCompletionOr> SubtleCrypto::derive_key(AlgorithmIdentifier algorithm, GC::Ref base_key, AlgorithmIdentifier derived_key_type, bool extractable, Vector key_usages) +GC::Ref SubtleCrypto::derive_key(AlgorithmIdentifier algorithm, GC::Ref base_key, AlgorithmIdentifier derived_key_type, bool extractable, Vector key_usages) { auto& realm = this->realm(); auto& vm = this->vm(); @@ -747,7 +747,7 @@ JS::ThrowCompletionOr> SubtleCrypto::derive_key(Algorit } // https://w3c.github.io/webcrypto/#SubtleCrypto-method-wrapKey -JS::ThrowCompletionOr> SubtleCrypto::wrap_key(Bindings::KeyFormat format, GC::Ref key, GC::Ref wrapping_key, AlgorithmIdentifier algorithm) +GC::Ref SubtleCrypto::wrap_key(Bindings::KeyFormat format, GC::Ref key, GC::Ref wrapping_key, AlgorithmIdentifier algorithm) { auto& realm = this->realm(); // 1. Let format, key, wrappingKey and algorithm be the format, key, wrappingKey and wrapAlgorithm parameters passed to the wrapKey() method, respectively. @@ -890,7 +890,7 @@ JS::ThrowCompletionOr> SubtleCrypto::wrap_key(Bindings: } // https://w3c.github.io/webcrypto/#SubtleCrypto-method-unwrapKey -JS::ThrowCompletionOr> SubtleCrypto::unwrap_key(Bindings::KeyFormat format, KeyDataType wrapped_key, GC::Ref unwrapping_key, AlgorithmIdentifier algorithm, AlgorithmIdentifier unwrapped_key_algorithm, bool extractable, Vector key_usages) +GC::Ref SubtleCrypto::unwrap_key(Bindings::KeyFormat format, KeyDataType wrapped_key, GC::Ref unwrapping_key, AlgorithmIdentifier algorithm, AlgorithmIdentifier unwrapped_key_algorithm, bool extractable, Vector key_usages) { auto& realm = this->realm(); // 1. Let format, unwrappingKey, algorithm, unwrappedKeyAlgorithm, extractable and usages, be the format, unwrappingKey, unwrapAlgorithm, diff --git a/Libraries/LibWeb/Crypto/SubtleCrypto.h b/Libraries/LibWeb/Crypto/SubtleCrypto.h index 054187d847f..78310aa0084 100644 --- a/Libraries/LibWeb/Crypto/SubtleCrypto.h +++ b/Libraries/LibWeb/Crypto/SubtleCrypto.h @@ -28,20 +28,20 @@ public: GC::Ref encrypt(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& data_parameter); GC::Ref decrypt(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& data_parameter); - JS::ThrowCompletionOr> sign(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& data_parameter); - JS::ThrowCompletionOr> verify(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& signature, GC::Root const& data_parameter); + GC::Ref sign(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& data_parameter); + GC::Ref verify(AlgorithmIdentifier const& algorithm, GC::Ref key, GC::Root const& signature, GC::Root const& data_parameter); GC::Ref digest(AlgorithmIdentifier const& algorithm, GC::Root const& data); - JS::ThrowCompletionOr> generate_key(AlgorithmIdentifier algorithm, bool extractable, Vector key_usages); - JS::ThrowCompletionOr> derive_bits(AlgorithmIdentifier algorithm, GC::Ref base_key, Optional length_optional); - JS::ThrowCompletionOr> derive_key(AlgorithmIdentifier algorithm, GC::Ref base_key, AlgorithmIdentifier derived_key_type, bool extractable, Vector key_usages); + GC::Ref generate_key(AlgorithmIdentifier algorithm, bool extractable, Vector key_usages); + GC::Ref derive_bits(AlgorithmIdentifier algorithm, GC::Ref base_key, Optional length_optional); + GC::Ref derive_key(AlgorithmIdentifier algorithm, GC::Ref base_key, AlgorithmIdentifier derived_key_type, bool extractable, Vector key_usages); JS::ThrowCompletionOr> import_key(Bindings::KeyFormat format, KeyDataType key_data, AlgorithmIdentifier algorithm, bool extractable, Vector key_usages); - JS::ThrowCompletionOr> export_key(Bindings::KeyFormat format, GC::Ref key); + GC::Ref export_key(Bindings::KeyFormat format, GC::Ref key); - JS::ThrowCompletionOr> wrap_key(Bindings::KeyFormat format, GC::Ref key, GC::Ref wrapping_key, AlgorithmIdentifier wrap_algorithm); - JS::ThrowCompletionOr> unwrap_key(Bindings::KeyFormat format, KeyDataType wrapped_key, GC::Ref unwrapping_key, AlgorithmIdentifier unwrap_algorithm, AlgorithmIdentifier unwrapped_key_algorithm, bool extractable, Vector key_usages); + GC::Ref wrap_key(Bindings::KeyFormat format, GC::Ref key, GC::Ref wrapping_key, AlgorithmIdentifier wrap_algorithm); + GC::Ref unwrap_key(Bindings::KeyFormat format, KeyDataType wrapped_key, GC::Ref unwrapping_key, AlgorithmIdentifier unwrap_algorithm, AlgorithmIdentifier unwrapped_key_algorithm, bool extractable, Vector key_usages); private: explicit SubtleCrypto(JS::Realm&);