-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SubtleCrypto verify methods accepts mutable reference that should be immutable? #3795
Comments
I notice a few other uses of |
See The We can add exceptions here: wasm-bindgen/crates/webidl/src/constants.rs Lines 43 to 99 in 55a7fb8
I'm happy to review a PR adding exceptions to any |
Describe the Bug
Some of the verify methods on
SubtleCrypto
take mutable references to thesignature
bytes. It doesn't seem desirable that a method for verifying signatures would mutate the signature bytes, so I wonder if this is a mistake?Steps to Reproduce
verify____
methods acceptsignature: &mut [u8]
Expected Behavior
I would expect that a signature verification would never need to mutate the signature.
Actual Behavior
Parameter is explicitly set to be mutable; git history doesn't indicate a reason why.
wasm-bindgen/crates/web-sys/src/features/gen_SubtleCrypto.rs
Line 540 in 55a7fb8
Additional Context
The MDN docs don't suggest that the signature might be mutated. They don't promise it won't, so I'm just going on instinct here.
The text was updated successfully, but these errors were encountered: