Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set
Ed25519
CryptoKey#algorithm.name
to NODE-ED25519
The `Ed25519` algorithm was leaking to user code via `CryptoKey#algorithm.name`, but Cloudflare Workers only support the `NODE-ED25519` algorithm. This change plugs the leak, by overriding `algorithm.name`, and then using `Proxy`s before passing `CryptoKey`s back to Node. Closes panva/jose#446.
- Loading branch information
Showing
2 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mrbbot since both workerd and the live service now have Ed25519 the jose library will not fallback to NODE-ED25519 during generation or imports anymore.
This can/should be removed.