diff --git a/CHANGELOG.md b/CHANGELOG.md index 87615ed6..bb8b0ead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [v3.1.3](https://github.com/jwt/ruby-jwt/tree/v3.1.3) (NEXT) + +[Full Changelog](https://github.com/jwt/ruby-jwt/compare/v3.1.2...v3.1.3) + +**Features:** + +- Your contribution here + +**Fixes and enhancements:** + +- Fix compatibility with the openssl 4.0 gem [#706](https://github.com/jwt/ruby-jwt/pull/706) +- Your contribution here + ## [v3.1.2](https://github.com/jwt/ruby-jwt/tree/v3.1.2) (2025-06-28) [Full Changelog](https://github.com/jwt/ruby-jwt/compare/v3.1.1...v3.1.2) diff --git a/lib/jwt/jwk/rsa.rb b/lib/jwt/jwk/rsa.rb index c4918602..2a28e0f7 100644 --- a/lib/jwt/jwk/rsa.rb +++ b/lib/jwt/jwk/rsa.rb @@ -195,7 +195,7 @@ def validate_rsa_parameters!(rsa_parameters) if ::JWT.openssl_3? alias create_rsa_key create_rsa_key_using_der - elsif OpenSSL::PKey::RSA.new.respond_to?(:set_key) + elsif OpenSSL::PKey::RSA.method_defined?(:set_key) alias create_rsa_key create_rsa_key_using_sets else alias create_rsa_key create_rsa_key_using_accessors diff --git a/lib/jwt/version.rb b/lib/jwt/version.rb index 34436db0..4c1321c0 100644 --- a/lib/jwt/version.rb +++ b/lib/jwt/version.rb @@ -16,7 +16,7 @@ def self.gem_version module VERSION MAJOR = 3 MINOR = 1 - TINY = 2 + TINY = 3 PRE = nil STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.') diff --git a/spec/jwt/jwk/rsa_spec.rb b/spec/jwt/jwk/rsa_spec.rb index 1b283fb6..321dafee 100644 --- a/spec/jwt/jwk/rsa_spec.rb +++ b/spec/jwt/jwk/rsa_spec.rb @@ -262,7 +262,7 @@ describe '.create_rsa_key_using_sets' do before do - skip 'OpenSSL without the RSA#set_key method not supported' unless OpenSSL::PKey::RSA.new.respond_to?(:set_key) + skip 'OpenSSL without the RSA#set_key method not supported' unless OpenSSL::PKey::RSA.method_defined?(:set_key) skip 'OpenSSL 3.0 does not allow mutating objects anymore' if JWT.openssl_3? end @@ -274,7 +274,7 @@ describe '.create_rsa_key_using_accessors' do before do - skip 'OpenSSL if RSA#d= is not available there is no accessors anymore' unless OpenSSL::PKey::RSA.new.respond_to?(:d=) + skip 'OpenSSL if RSA#d= is not available there is no accessors anymore' unless OpenSSL::PKey::RSA.method_defined?(:d=) end subject(:rsa) { described_class.create_rsa_key_using_accessors(rsa_parameters) }