-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add support for custom JWS algorithms #1410
Merged
itsyaasir
merged 6 commits into
iotaledger:main
from
frederikrothenberger:frederik/custom-alg
Sep 17, 2024
Merged
Add support for custom JWS algorithms #1410
itsyaasir
merged 6 commits into
iotaledger:main
from
frederikrothenberger:frederik/custom-alg
Sep 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR introduces a feature `custom_alg` to `identity_jose` (disabled by default) that allows it to process JWS with custom `alg` values. Switching on `custom_alg` makes quite a few changes to `JwsAlgorithm`: - The type is no longer `Copy` - `name()` takes only a reference and returns a `String` rather than `&'static str` - The constant `ALL` is removed as it is no longer possible to enumerate all variants
@itsyaasir, @eike-hass: The change using a feature flag seems to be quite reasonable. What do you think? |
frederikrothenberger
force-pushed
the
frederik/custom-alg
branch
from
September 11, 2024 14:26
eb35981
to
a7cdda4
Compare
eike-hass
added
Added
A new feature that requires a minor release. Part of "Added" section in changelog
Rust
Related to the core Rust code. Becomes part of the Rust changelog.
labels
Sep 16, 2024
itsyaasir
approved these changes
Sep 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing to this :) Everything looks good to me!
Just some few comments here and there.
wulfraem
approved these changes
Sep 17, 2024
Thanks for this @frederikrothenberger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a feature
custom_alg
toidentity_jose
(disabled by default) that allows it to process JWS with customalg
values.Switching on
custom_alg
makes quite a few changes toJwsAlgorithm
:Copy
name()
takes only a reference and returns aString
rather than&'static str
ALL
is removed as it is no longer possible to enumerate all variantsFixes issue #1406.
Type of change
Add an
x
to the boxes that are relevant to your changes.How the change has been tested
Added a new integration test to
identity_jose
that exercises the functionality.Note: requires CI changes to be run with
cargo test --test custom_alg --features="custom_alg"
Change checklist
Add an
x
to the boxes that are relevant to your changes.