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

JWK from X509 certificate #529

Merged
merged 1 commit into from
Nov 29, 2021
Merged

JWK from X509 certificate #529

merged 1 commit into from
Nov 29, 2021

Conversation

cplussharp
Copy link
Contributor

including "x5c", "x5t" and "x5t#S256"

also load X509 from JWK

including "x5c", "x5t" and "x5t#S256"

also load X509 from JWK
@kjur kjur merged commit 6553edf into kjur:master Nov 29, 2021
@kjur
Copy link
Owner

kjur commented Nov 29, 2021

Hi @cplussharp , thank you kindly for your PR.

@kjur
Copy link
Owner

kjur commented Nov 29, 2021

Hi @cplussharp . Sorry but I don't want to affect JWK to X509 class. So this function may be moved to this kind of methods to KEYUTIL.getJWK* in the next release.

@cplussharp
Copy link
Contributor Author

That's OK. I was not sure where to place the functionality. KEYUTIL.getJWK* was also my first idea, but for easier development I placed in directly in X509. ;-)
Btw. there is no getFingerprint() method in X509. Should I made a PR to introduce it? Maybe with the algorithm as parameter and the default would be "sha1"?

@cplussharp cplussharp deleted the x509-jwk branch November 29, 2021 08:26
@kjur
Copy link
Owner

kjur commented Nov 29, 2021

Thank you @cplussharp . As for fingerprint, does this help you?
https://kjur.github.io/jsrsasign/api/symbols/KJUR.jws.JWS.html#.getJWKthumbprint

@cplussharp
Copy link
Contributor Author

Sorry that question was a little bit missleading here. I meant the X509 fingerprint.

@kjur
Copy link
Owner

kjur commented Dec 1, 2021

Hi @cplussharp , I've released 10.5.1 update today including your PRs.
Thank you indeed for your great contributions.
I've done some modification for your PRs:

  • move X509.getPublicKeyJWK to KEYUTIL.getJWK which supports private/public key and certificate
  • readCertJWK removed because not so much effort required
  • qunit-do-x509-jwk.html removed and some tests in it were moved to qunit-do-keyutil-jwk.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants