aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/bindings/webcrypto/CryptoKeyOKP.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/bun.js/bindings/webcrypto/CryptoKeyOKP.cpp b/src/bun.js/bindings/webcrypto/CryptoKeyOKP.cpp
index a4138d8c9..b7dc55018 100644
--- a/src/bun.js/bindings/webcrypto/CryptoKeyOKP.cpp
+++ b/src/bun.js/bindings/webcrypto/CryptoKeyOKP.cpp
@@ -232,17 +232,19 @@ bool CryptoKeyOKP::isValidOKPAlgorithm(CryptoAlgorithmIdentifier algorithm)
auto CryptoKeyOKP::algorithm() const -> KeyAlgorithm
{
- CryptoEcKeyAlgorithm result;
+ CryptoKeyAlgorithm result;
+ // FIXME: This should be set to the actual algorithm name in the case of X25519
result.name = CryptoAlgorithmRegistry::singleton().name(algorithmIdentifier());
- switch (m_curve) {
- case NamedCurve::X25519:
- result.namedCurve = X25519;
- break;
- case NamedCurve::Ed25519:
- result.namedCurve = Ed25519;
- break;
- }
+ // This is commented out because the spec doesn't define the namedCurve field for OKP keys
+ // switch (m_curve) {
+ // case NamedCurve::X25519:
+ // result.namedCurve = X25519;
+ // break;
+ // case NamedCurve::Ed25519:
+ // result.namedCurve = Ed25519;
+ // break;
+ // }
return result;
}