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

fix(ext/crypto): export private x25519 JWK key #27828

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

littledivy
Copy link
Member

Ref #26431

Comment on lines +50 to +51
let private_key: [u8; 32] =
private_key.try_into().expect("Expected byteLength 32");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any logic in JS that would prevent passing keys of other length. Maybe handle it gracefully and return an error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is passed from the inner key handle held by JS which should be already validated. If this panics then there is a bug elsewhere during import/generation of the key.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok 👍

@littledivy littledivy merged commit 88490d0 into denoland:main Jan 27, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants