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

No way to access CryptoKeyPair properties #2092

Closed
bakape opened this issue Apr 19, 2020 · 5 comments
Closed

No way to access CryptoKeyPair properties #2092

bakape opened this issue Apr 19, 2020 · 5 comments
Labels
breaking-change Tracking breaking changes for the next major version bump (if ever) bug web-sys Issues related to the `web-sys` crate

Comments

@bakape
Copy link

bakape commented Apr 19, 2020

Describe the Bug

The CryptoKeyPair type only has property setters private_key() and public_key(). There are no methods to access the existing property values. This conflicts with the actual specified interface.

Expected Behavior

CryptoKeyPair should provide both setter and getter methods.

Additional Context

Spec: https://www.w3.org/TR/WebCryptoAPI/#keypair
Docs: https://developer.mozilla.org/en-US/docs/Web/API/CryptoKeyPair

@bakape bakape added the bug Something isn't working label Apr 19, 2020
@Pauan
Copy link
Contributor

Pauan commented Apr 19, 2020

I think this is the first time I've seen a dictionary that is actually returned by an API.

So we should probably change the dictionaries to no longer be builders, but instead have a more normal API.

@Pauan Pauan added breaking-change Tracking breaking changes for the next major version bump (if ever) bug web-sys Issues related to the `web-sys` crate and removed bug Something isn't working labels Apr 19, 2020
@Pauan
Copy link
Contributor

Pauan commented Apr 19, 2020

(In the meantime you can workaround this by using Reflect::get(&foo, &JsValue::from("privateKey")))

@bakape
Copy link
Author

bakape commented Apr 19, 2020 via email

@eminence
Copy link
Contributor

CC #1793

@daxpedda
Copy link
Collaborator

Duplicate of #1793.

@daxpedda daxpedda closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Tracking breaking changes for the next major version bump (if ever) bug web-sys Issues related to the `web-sys` crate
Projects
None yet
Development

No branches or pull requests

4 participants