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 will allow to derive most standardized common parameters from already specified parameters.
This is a follow-up to a few points which could not be addressed in #520, but were brought up by me in #518.
Overview
Using all of its features, given an X.509 certificate, you can acquire a JWK like this:
This will extract the public key, construct the JWK, and try to set the following parameters:
kid
as previously implementedx5c
is a representation of the certificatex5t
andx5t#S256
are wide-spread certificate thumbprintskey_ops
anduse
state allowed key usages and are derived from the X.509keyUsage
extension, if presentalg
will be set to a sensible default depending onuse
andkty
Of course, any parameters specified in the above invocation will still take precedence.
There is even support for the
x5u
parameter, to fetch a remote certificate chain:TODO
x5c_key_finder
can be reused