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

LibWeb: Implement ECDH.generateKey #2402

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devgianlu
Copy link

Fixes some tests in https://wpt.live/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.html?1-1000 by having a working ECDH generateKey so that ... with wrong (ECDH) key tests pass.

@rmg-x
Copy link
Contributor

rmg-x commented Nov 17, 2024

We probably want in-tree tests for this, see Documentation/Testing.md for how to create them.

Once you have one created, you can run an individual LibWeb test with this command:

Meta/ladybird.sh run headless-browser --run-tests $PWD/Tests/LibWeb --force-fontconfig -f your-test-name.html

@devgianlu
Copy link
Author

devgianlu commented Nov 17, 2024

We probably want in-tree tests for this, see Documentation/Testing.md for how to create them.

Should I add to Tests/LibWeb/Text/input/Crypto/SubtleCrypto-generateKey.html?

EDIT: Looks like it is excluded for being Flaky on CI

@rmg-x
Copy link
Contributor

rmg-x commented Nov 17, 2024

That seems fine to me, but I'm not a maintainer. It looks like that only has RSA-OAEP key generation currently but the name definitely implies it should be more generic so...

@rmg-x
Copy link
Contributor

rmg-x commented Nov 17, 2024

On a recent PR I did for AES-GCM (#2143), I just created a separate file Crypto/SubtleCrypto-aesgcm.html for the cases that were fixed.

@gmta
Copy link
Collaborator

gmta commented Nov 18, 2024

Welcome @devgianlu !

Note that you do not necessarily need to write your own test if there's a proper WPT test case for it! Using Meta/import-wpt-tests.py you can pull in a test case covering ECDH and use the expected result file to mark which tests are expected to pass, and which still fail.

@devgianlu
Copy link
Author

Thanks @gmta!

I've looked deeper into the tests situation and it looks this fixes a bunch of stuff in https://wpt.live/WebCryptoAPI/generateKey/successes_ECDH.https.any.html and https://wpt.live/WebCryptoAPI/generateKey/failures_ECDH.https.any.html too, so I've imported those.

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.

3 participants