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

fix: #9 adapt initialiser parameter to OpenSSL::PKey implementation #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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