aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-02-02 14:15:40 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-02-02 14:15:40 -0800
commit76f72517ff41e3b4892b5e7d3225586aa789f103 (patch)
tree4c74462f014e4d8ca7afee4cb5f1eaeca747b437
parentbb851b7e18a134ed88b82b8039b8b41547c9e92c (diff)
downloadbun-76f72517ff41e3b4892b5e7d3225586aa789f103.tar.gz
bun-76f72517ff41e3b4892b5e7d3225586aa789f103.tar.zst
bun-76f72517ff41e3b4892b5e7d3225586aa789f103.zip
try this?
-rw-r--r--src/bun.js/bindings/webcrypto/CryptoKeyOKPOpenSSL.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bun.js/bindings/webcrypto/CryptoKeyOKPOpenSSL.cpp b/src/bun.js/bindings/webcrypto/CryptoKeyOKPOpenSSL.cpp
index b020e6502..79e99d917 100644
--- a/src/bun.js/bindings/webcrypto/CryptoKeyOKPOpenSSL.cpp
+++ b/src/bun.js/bindings/webcrypto/CryptoKeyOKPOpenSSL.cpp
@@ -302,9 +302,9 @@ String CryptoKeyOKP::generateJwkX() const
ASSERT(type() == CryptoKeyType::Private);
- uint8_t publicKey[X25519_PRIVATE_KEY_LEN];
-
- X25519_public_from_private(publicKey, m_data.data());
+ uint8_t publicKey[ED25519_PUBLIC_KEY_LEN];
+ uint8_t privateKey[ED25519_PRIVATE_KEY_LEN];
+ ED25519_keypair_from_seed(publicKey, privateKey, m_data.data());
return base64URLEncodeToString(Span<const uint8_t> { publicKey, sizeof(publicKey) });
}