Skip to content

Commit

Permalink
LibWeb: Remove spec error comments for RSAOAEP
Browse files Browse the repository at this point in the history
The spec has been fixed since w3c/webcrypto#391.
  • Loading branch information
devgianlu authored and awesomekling committed Jan 2, 2025
1 parent 2066ed2 commit ac0036d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,12 +986,10 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> RSAOAEP::import_key(Web::Crypto::Algorit
if (!meets_requirements)
return WebIDL::DataError::create(m_realm, "Invalid JWK private key"_string);

// FIXME: Spec error, it should say 'the RSA private key identified by interpreting jwk according to section 6.3.2'
// 2. Let privateKey represent the RSA public key identified by interpreting jwk according to Section 6.3.1 of JSON Web Algorithms [JWA].
// 2. Let privateKey represent the RSA private key identified by interpreting jwk according to Section 6.3.2 of JSON Web Algorithms [JWA].
auto private_key = TRY(parse_jwk_rsa_private_key(realm, jwk));

// FIXME: Spec error, it should say 'not to be a valid RSA private key'
// 3. If privateKey can be determined to not be a valid RSA public key according to [RFC3447], then throw a DataError.
// 3. If privateKey can be determined to not be a valid RSA private key according to [RFC3447], then throw a DataError.
// FIXME: Validate the private key

// 4. Let key be a new CryptoKey representing privateKey.
Expand Down

0 comments on commit ac0036d

Please sign in to comment.