summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-08-28 20:33:02 +0530
committerGitHub <noreply@github.com>2024-08-28 15:03:02 +0000
commitb9c144df6fdee9b5e89f6f7787463b366164d622 (patch)
treeeab3c285e67fa0d37ed85792abea9b9e1184ce60 /ext/node/polyfills/internal
parent044e7c4e63484387ea9066085aeb65142a6b1430 (diff)
fix(ext/node): export JWK public key (#25239)
Fixes https://github.com/denoland/deno/issues/18928 Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'ext/node/polyfills/internal')
-rw-r--r--ext/node/polyfills/internal/crypto/keys.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/crypto/keys.ts b/ext/node/polyfills/internal/crypto/keys.ts
index c2e9d95ee..49a618b65 100644
--- a/ext/node/polyfills/internal/crypto/keys.ts
+++ b/ext/node/polyfills/internal/crypto/keys.ts
@@ -21,6 +21,7 @@ import {
op_node_export_private_key_der,
op_node_export_private_key_pem,
op_node_export_public_key_der,
+ op_node_export_public_key_jwk,
op_node_export_public_key_pem,
op_node_export_secret_key,
op_node_export_secret_key_b64url,
@@ -786,8 +787,9 @@ export class PublicKeyObject extends AsymmetricKeyObject {
export(options: JwkKeyExportOptions | KeyExportOptions<KeyFormat>) {
if (options && options.format === "jwk") {
- notImplemented("jwk public key export not implemented");
+ return op_node_export_public_key_jwk(this[kHandle]);
}
+
const {
format,
type,