LibWeb: Remove dead write in HKDF/PBKDF importKey operation
This corresponds to a recent change in the spec: https://github.com/w3c/webcrypto/pull/379
This commit is contained in:
parent
ee3b86c3f8
commit
efad0b5676
Notes:
github-actions[bot]
2024-10-25 21:51:26 +00:00
Author: https://github.com/BenWiederhake Commit: https://github.com/LadybirdBrowser/ladybird/commit/efad0b56769 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1970
1 changed files with 8 additions and 14 deletions
|
@ -995,19 +995,16 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<CryptoKey>> HKDF::import_key(AlgorithmParam
|
|||
// 4. Set the [[type]] internal slot of key to "secret".
|
||||
key->set_type(Bindings::KeyType::Secret);
|
||||
|
||||
// 5. Set the [[extractable]] internal slot of key to false.
|
||||
key->set_extractable(false);
|
||||
|
||||
// 6. Let algorithm be a new KeyAlgorithm object.
|
||||
// 5. Let algorithm be a new KeyAlgorithm object.
|
||||
auto algorithm = KeyAlgorithm::create(m_realm);
|
||||
|
||||
// 7. Set the name attribute of algorithm to "HKDF".
|
||||
// 6. Set the name attribute of algorithm to "HKDF".
|
||||
algorithm->set_name("HKDF"_string);
|
||||
|
||||
// 8. Set the [[algorithm]] internal slot of key to algorithm.
|
||||
// 7. Set the [[algorithm]] internal slot of key to algorithm.
|
||||
key->set_algorithm(algorithm);
|
||||
|
||||
// 9. Return key.
|
||||
// 8. Return key.
|
||||
return key;
|
||||
}
|
||||
|
||||
|
@ -1035,19 +1032,16 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<CryptoKey>> PBKDF2::import_key(AlgorithmPar
|
|||
// 5. Set the [[type]] internal slot of key to "secret".
|
||||
key->set_type(Bindings::KeyType::Secret);
|
||||
|
||||
// 6. Set the [[extractable]] internal slot of key to false.
|
||||
key->set_extractable(false);
|
||||
|
||||
// 7. Let algorithm be a new KeyAlgorithm object.
|
||||
// 6. Let algorithm be a new KeyAlgorithm object.
|
||||
auto algorithm = KeyAlgorithm::create(m_realm);
|
||||
|
||||
// 8. Set the name attribute of algorithm to "PBKDF2".
|
||||
// 7. Set the name attribute of algorithm to "PBKDF2".
|
||||
algorithm->set_name("PBKDF2"_string);
|
||||
|
||||
// 9. Set the [[algorithm]] internal slot of key to algorithm.
|
||||
// 8. Set the [[algorithm]] internal slot of key to algorithm.
|
||||
key->set_algorithm(algorithm);
|
||||
|
||||
// 10. Return key.
|
||||
// 9. Return key.
|
||||
return key;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue