jwt_auth_cognito 1.0.0.pre.beta.7 → 1.0.0.pre.beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18bc858f283dfe36ce2b0a160dd1ba1003d76ac13203985ff5b3e3384489fcc7
4
- data.tar.gz: b2418e0113b7891fa6de56404832011e680e19fa5a8b4882087bafa9787485c5
3
+ metadata.gz: 890178b5dabf5d60fd718020edb4b3a53c7beb031edcbfe4530b2075643235d1
4
+ data.tar.gz: 0561a4d505653838b1a876ac2c09b96e149302b562c8ea7b0838a295770ad302
5
5
  SHA512:
6
- metadata.gz: 6148669c5e2816b9f2730ae4b0af50bcfae6873c1420a7d9e2040943859018c160327d038e97f7b5aa56b4416ae5a033f0ab101650fcdb7229dd3880bdf31235
7
- data.tar.gz: baceecd5ab1bf12d73dbc79c119c6c66fa006dee4fc14fc5726fe34919053b4fc6df67e3a8dd59df5e3d827cb1ad76e61ffe3bcb6996b3e57780839329365c91
6
+ metadata.gz: fd88dbfd8f4bba8480b7f9bc0fd8e277dc2c01c21ba4ada2a1011fc6080c2886cd78ebd00040382f04d9b80cc40e01754a24d0779417cdf94ec0c824cc7e8ceb
7
+ data.tar.gz: 6f96b767c1281c5be52be7a9c7911fc05e692b1fb48107ee96cbc2c3c659e819d5aaad4e1dded17e5f9d0c9aae201839cd3f7005ee43d1cff8fe7af0cd7ee37c
@@ -98,9 +98,21 @@ module JwtAuthCognito
98
98
  n = base64url_decode(key_data['n'])
99
99
  e = base64url_decode(key_data['e'])
100
100
 
101
+ # Create RSA key using method compatible with OpenSSL 3.0+
102
+ n_bn = OpenSSL::BN.new(n, 2)
103
+ e_bn = OpenSSL::BN.new(e, 2)
104
+
105
+ # Use the new constructor that accepts modulus and exponent
101
106
  key = OpenSSL::PKey::RSA.new
102
- key.n = OpenSSL::BN.new(n, 2)
103
- key.e = OpenSSL::BN.new(e, 2)
107
+
108
+ # For OpenSSL 3.0+ compatibility, use set_key method if available
109
+ if key.respond_to?(:set_key)
110
+ key.set_key(n_bn, e_bn, nil)
111
+ else
112
+ # Fallback for older OpenSSL versions
113
+ key.n = n_bn
114
+ key.e = e_bn
115
+ end
104
116
 
105
117
  key
106
118
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JwtAuthCognito
4
- VERSION = '1.0.0-beta.7'
4
+ VERSION = '1.0.0-beta.8'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt_auth_cognito
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.7
4
+ version: 1.0.0.pre.beta.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Optimal