mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-21 10:32:51 +00:00
LibTLS+LibWeb: Decouple EC parameters from TLS::SupportedGroup
This is in preparation of the next commits to split the changes.
This commit is contained in:
parent
32a90a7fd1
commit
fcdcba51f5
Notes:
github-actions[bot]
2024-11-25 13:12:18 +00:00
Author: https://github.com/devgianlu
Commit: fcdcba51f5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2563
Reviewed-by: https://github.com/alimpfard ✅
6 changed files with 36 additions and 21 deletions
|
@ -2724,7 +2724,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> ED25519::import_key(
|
|||
return WebIDL::DataError::create(m_realm, "Invalid algorithm identifier"_string);
|
||||
|
||||
// 5. If the parameters field of the algorithm AlgorithmIdentifier field of spki is present, then throw a DataError.
|
||||
if (static_cast<u16>(spki.algorithm.ec_parameters) != 0)
|
||||
if (spki.algorithm.ec_parameters.has_value())
|
||||
return WebIDL::DataError::create(m_realm, "Invalid algorithm parameters"_string);
|
||||
|
||||
// 6. Let publicKey be the Ed25519 public key identified by the subjectPublicKey field of spki.
|
||||
|
@ -2767,7 +2767,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> ED25519::import_key(
|
|||
|
||||
// 5. If the parameters field of the privateKeyAlgorithm PrivateKeyAlgorithmIdentifier field of privateKeyInfo is present,
|
||||
// then throw a DataError.
|
||||
if (static_cast<u16>(private_key_info.algorithm.ec_parameters) != 0)
|
||||
if (private_key_info.algorithm.ec_parameters.has_value())
|
||||
return WebIDL::DataError::create(m_realm, "Invalid algorithm parameters"_string);
|
||||
|
||||
// 6. Let curvePrivateKey be the result of performing the parse an ASN.1 structure algorithm,
|
||||
|
@ -3417,7 +3417,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> X25519::import_key([[maybe_unused]] Web:
|
|||
return WebIDL::DataError::create(m_realm, "Invalid algorithm"_string);
|
||||
|
||||
// 5. If the parameters field of the algorithm AlgorithmIdentifier field of spki is present, then throw a DataError.
|
||||
if (static_cast<u16>(spki.algorithm.ec_parameters) != 0)
|
||||
if (spki.algorithm.ec_parameters.has_value())
|
||||
return WebIDL::DataError::create(m_realm, "Invalid algorithm parameters"_string);
|
||||
|
||||
// 6. Let publicKey be the X25519 public key identified by the subjectPublicKey field of spki.
|
||||
|
@ -3458,7 +3458,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> X25519::import_key([[maybe_unused]] Web:
|
|||
return WebIDL::DataError::create(m_realm, "Invalid algorithm"_string);
|
||||
|
||||
// 5. If the parameters field of the privateKeyAlgorithm PrivateKeyAlgorithmIdentifier field of privateKeyInfo is present, then throw a DataError.
|
||||
if (static_cast<u16>(private_key_info.algorithm.ec_parameters) != 0)
|
||||
if (private_key_info.algorithm.ec_parameters.has_value())
|
||||
return WebIDL::DataError::create(m_realm, "Invalid algorithm parameters"_string);
|
||||
|
||||
// 6. Let curvePrivateKey be the result of performing the parse an ASN.1 structure algorithm,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue