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): throw on key & op algo mismatch #12838

Merged
merged 6 commits into from Nov 25, 2021

Conversation

lucacasonato
Copy link
Member

Throw when key and operation algorithm do not match.

Specified here: https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-decrypt

Tested via WPT

Comment on lines 3093 to 3095
"AES-CBC 128-bit key with mismatched key and algorithm",
"AES-CBC 192-bit key with mismatched key and algorithm",
"AES-CBC 256-bit key with mismatched key and algorithm",
Copy link
Member Author

Choose a reason for hiding this comment

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

These fail because AES-CTR is not implemented.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

tools/wpt/expectation.json Outdated Show resolved Hide resolved
tools/wpt/expectation.json Outdated Show resolved Hide resolved
@lucacasonato lucacasonato merged commit 2853e37 into denoland:main Nov 25, 2021
@lucacasonato lucacasonato deleted the some_crypto_fixes branch November 25, 2021 14:57
lucacasonato added a commit to lucacasonato/deno that referenced this pull request Dec 3, 2021
lucacasonato added a commit to lucacasonato/deno that referenced this pull request Dec 3, 2021
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.

None yet

4 participants