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): optional additionalData in encrypt/decrypt #13669

Merged
merged 3 commits into from
Feb 16, 2022

Conversation

littledivy
Copy link
Member

Closes #13525

Was failing earlier because undefined is not None with serde (for Option<Vec<u8>>). This patch passes an empty buf to the op.

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

Make additional_data non optional Rust side if you are doing the defaulting JS side.

@lucacasonato lucacasonato added this to the 1.19.0 milestone Feb 15, 2022
@littledivy
Copy link
Member Author

@lucacasonato I've made it null instead so we can keep the spec logic Rust side.

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

LGTM

@littledivy littledivy merged commit 77a9683 into denoland:main Feb 16, 2022
@littledivy littledivy deleted the fix_13525_crypto_additionalData branch February 16, 2022 10:57
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.

[AES-GCM] 'additionalData' field is required on crypto.subtle.encrypt()
3 participants