Skip to content

Convert JWT signatures to the correct format #44

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

Merged
merged 1 commit into from May 8, 2017
Merged

Convert JWT signatures to the correct format #44

merged 1 commit into from May 8, 2017

Conversation

ghost
Copy link

@ghost ghost commented May 7, 2017

key.sign returns a DER-encoded ASN.1 signature, but RFC 7518, section 3.4 says we should include R and S directly, in that order, and in big-endian form.

I also removed the test, because the alternative form of including the DER signature isn't standard, and likely to be rejected by other JWT implementations.

@ghost ghost requested a review from jrconlin May 7, 2017 00:49
`key.sign` returns an ASN.1-encoded, DER-formatted signature, but
RFC 7518, section 3.4 says we should include R and S directly, in that
order, and in big-endian form.
Copy link
Member

@jrconlin jrconlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, missed that part of the spec,

@jrconlin jrconlin merged commit 0a49b84 into web-push-libs:master May 8, 2017
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.

1 participant