Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node compat crypto prime256v1 named curve not found #21761

Open
HadaIonut opened this issue Jan 2, 2024 · 2 comments
Open

Node compat crypto prime256v1 named curve not found #21761

HadaIonut opened this issue Jan 2, 2024 · 2 comments
Assignees
Labels
bug Something isn't working node API polyfill Related to various "node:*" modules APIs node compat

Comments

@HadaIonut
Copy link

HadaIonut commented Jan 2, 2024

Version: Deno 1.39.1

I am trying to get the node module werift working but i think i am having problems with the crypto symetric key generation.
The module throws (TypeError) Unsupported named curve when trying to execute:

import { generateKeyPairSync } from "node:crypto";

generateKeyPairSync("ec", {
  namedCurve: "prime256v1",
  publicKeyEncoding: {
    format: "der",
    type: "spki",
  },
  privateKeyEncoding: {
    format: "der",
    type: "pkcs8",
  },
});

This seems to work fine in node.

@iuioiua
Copy link
Collaborator

iuioiua commented Mar 13, 2024

I'll have a crack at this one.

@iuioiua
Copy link
Collaborator

iuioiua commented Mar 13, 2024

Once #22882 is merged, this issue will be blocked on KeyObject.export() not being implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node API polyfill Related to various "node:*" modules APIs node compat
Projects
None yet
Development

No branches or pull requests

4 participants