diff options
author | Simon Chopin <simon.chopin@canonical.com> | 2022-04-11 16:25:39 +0200 |
---|---|---|
committer | Florian Wininger <fw.centrale@gmail.com> | 2022-04-29 14:42:49 +0200 |
commit | 8729d47045bbca7eca266a353af18d857994cc5d (patch) | |
tree | b00f1e7756284aac6815b75e0f84480cf264fed3 /lib/net/ssh | |
parent | 4de6831dea4e922bf3052192eec143af015a3486 (diff) | |
download | net-ssh-8729d47045bbca7eca266a353af18d857994cc5d.tar.gz |
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 <lucas.kanashiro@canonical.com>
Diffstat (limited to 'lib/net/ssh')
-rw-r--r-- | lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |