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(WebCryptoAPI): remove unhandled rejections #36249

Merged
merged 2 commits into from
Oct 25, 2022
Merged

fix(WebCryptoAPI): remove unhandled rejections #36249

merged 2 commits into from
Oct 25, 2022

Conversation

panva
Copy link
Contributor

@panva panva commented Oct 4, 2022

This change

  • removes possible unhandled rejections (caused Deno's wpt runner to abort)
  • allows CFRG and ECDH suites to run even when not all algorithms are supported (by handling import/generate key rejection)

@twiss
Copy link
Member

twiss commented Oct 25, 2022

Hey 👋 Apologies for the delay.

I agree that not supporting X448 shouldn't prevent the X25519 tests from running, for example, however, this change hides the X448 import error entirely, and replaces it with (imo) confusing failures in the subsequent X448 tests. I think it would be better to have a failing test (or setup) with the X448 import failure, and separately have the X25519 test results.

One (sort of brute force) way to do that would be to split the file in two, one for X25519 and one for X448. That might also simplify the helper functions a bit, since then there's only one key pair per test. (But, it might still be nice to split them out into a helper file, to share them between all curves. Or, we could do that later.)

@panva
Copy link
Contributor Author

panva commented Oct 25, 2022

The approach follows other existing test files. Furthermore import errors need not to be prevailed given there are other import export specific tests in other files.

@panva
Copy link
Contributor Author

panva commented Oct 25, 2022

I would propose to land this and I can then refactor all these in all files to assert import was successful before running the rest of the operations.

@twiss
Copy link
Member

twiss commented Oct 25, 2022

OK, fair enough. Sounds good 👍

@twiss twiss merged commit 9978756 into web-platform-tests:master Oct 25, 2022
@panva
Copy link
Contributor Author

panva commented Oct 25, 2022

@twiss thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants