-
Notifications
You must be signed in to change notification settings - Fork 84
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
use node's webcrypto when available #326
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 57694eb The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hey! Thanks for this. I’m going to merge this into main or into #327 on Sunday. We’re changing how stuff works and the fact we can use crypto from node now is amazing. I’m running every version against the Next.js test suite so it’ll take some time to land but hopefully soon! 🙏 (btw @balazsorban44 will open a PR to drop Node14 support afaik) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna apply these changes into #327 after merging
This change makes it so that if the node process has a webcrypto API implementation that this implementation be used instead of
@peculiar/webcrypto
so that Ed25519 and X25519 algorithms become available.It also patches out the use of Ed448 and X448 Algorithms which are not present in Edge Functions at Vercel. Ed25519 and X25519 already is (or should be?) since it's already present in workerd and CF Workers. This prototype update can easily be omitted but then EdgeRuntime would support more than the Edge Functions at Vercel runtime... This way they're aligned, but it's ugly and messes with the prototype when using edge runtime programatically... I'm happy to remove it from the PRThe @peculiar/webcrypto dependency can be safely dropped when node 14 support is removed.