Skip to content

JwkUtils::compute_digest must not fail #480

Closed

Description

@arckoor

The compute_digest method currently does not return a Result<>, and thus is not allowed to error. This is not a problem for the built in providers, however third party ones may need to throw an error, and must currently unwrap. This function should be changed to return a Result.

The Algorithm enum should also be made #[non_exhaustive], so that when algorithms are added in the future, third party providers continue to compile (and can panic via unimplemented!() instead).

Both changes are breaking.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions