Skip to content

Conversation

@Quantenradierer
Copy link

@Quantenradierer Quantenradierer commented Jun 3, 2022

Fixes #9

Instead of one parameters it allows a series of parameters (including none). The parameters are now conform with the actual implementation, see e.g.: https://ruby-doc.org/stdlib-2.6.1/libdoc/openssl/rdoc/OpenSSL/PKey/RSA.html

This mostly caused issues when none was given - part of the jwt gem initialisation process at it seems - since at least one parameter was expected.

However, it also adds an additional check to avoid issues when a different number of parameters are given: otherwise der_to_pem could raise an error - hiding the true error from the PKey initialisers

Also, it should be backwards compatible for older jwt gem versions.

instead of one parameters it allows a series of parameters (including none). This mostly caused issues when none was given - part of the rails initialisation - since at least one parameter was expected

However, it also adds an additional check to avoid issues when a different number of parameters are given: otherwise `der_to_pem` could raise an error - hiding the true error from the PKey initialisers
@Quantenradierer
Copy link
Author

@rylarson @danleyden @atreat please review

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.

ArgumentError (given 0, expected 1) with jwt 2.3.0

1 participant