From 8729d47045bbca7eca266a353af18d857994cc5d Mon Sep 17 00:00:00 2001 From: Simon Chopin Date: Mon, 11 Apr 2022 16:25:39 +0200 Subject: Use OpenSSL::PKey::EC.generate static method Migrate all instances of the pattern EC.new(foo).generate_key to EC.generate(foo), as the old pattern isn't supported when using OpenSSL 3.0, since one is not allowed to mess with the internal data of already created objects now. The new API has been introduced in Ruby 2.4. Co-authored-by: Lucas Kanashiro --- lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/net/ssh') diff --git a/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb b/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb index a0c911d..47279f0 100644 --- a/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +++ b/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb @@ -18,7 +18,7 @@ module Net private def generate_key # :nodoc: - OpenSSL::PKey::EC.new(curve_name).generate_key + OpenSSL::PKey::EC.generate(curve_name) end # compute shared secret from server's public key and client's private key -- cgit v1.2.1