Skip to content

Commit

Permalink
Fix issue with OpenSSL 3.0 (#294)
Browse files Browse the repository at this point in the history
* Fix issue with OpenSSL 3.0

* Run the client specs on Ubuntu 22.04
  • Loading branch information
ahukkanen committed Oct 6, 2022
1 parent 1b4db9e commit 48d3a4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby-client-workflow.yml
Expand Up @@ -55,7 +55,7 @@ jobs:
rspec-test:
name: RSpec tests
needs: lint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.2
if: "github.ref != 'refs/heads/develop'"
Expand Down
Expand Up @@ -13,13 +13,8 @@ def self.private_key?(json)
(json.keys & JWK_PRIVATE_FIELDS).any?
end

# TODO: remove everything below here when https://github.com/jwt/ruby-jwt/pull/375 is released
def self.import_private_key(json)
jwk = JWT::JWK.import(json)
jwk.keypair.set_key(decode_open_ssl_bn(json[:n]), decode_open_ssl_bn(json[:e]), decode_open_ssl_bn(json[:d]))
jwk.keypair.set_factors(decode_open_ssl_bn(json[:p]), decode_open_ssl_bn(json[:q]))
jwk.keypair.set_crt_params(decode_open_ssl_bn(json[:dp]), decode_open_ssl_bn(json[:dq]), decode_open_ssl_bn(json[:qi]))
jwk
JWT::JWK.import(json)
end

def self.private_export(jwk)
Expand Down

0 comments on commit 48d3a4f

Please sign in to comment.