diff options
Diffstat (limited to 'lib/net/ssh')
-rw-r--r-- | lib/net/ssh/transport/algorithms.rb | 1 | ||||
-rw-r--r-- | lib/net/ssh/transport/kex.rb | 2 | ||||
-rw-r--r-- | lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb | 11 |
3 files changed, 14 insertions, 0 deletions
diff --git a/lib/net/ssh/transport/algorithms.rb b/lib/net/ssh/transport/algorithms.rb index 9ab87b6..7408d40 100644 --- a/lib/net/ssh/transport/algorithms.rb +++ b/lib/net/ssh/transport/algorithms.rb @@ -41,6 +41,7 @@ module Net ecdh-sha2-nistp384 ecdh-sha2-nistp256 diffie-hellman-group-exchange-sha256 + diffie-hellman-group14-sha256 diffie-hellman-group14-sha1], encryption: %w[aes256-ctr aes192-ctr aes128-ctr], diff --git a/lib/net/ssh/transport/kex.rb b/lib/net/ssh/transport/kex.rb index b3571c3..a43d713 100644 --- a/lib/net/ssh/transport/kex.rb +++ b/lib/net/ssh/transport/kex.rb @@ -1,5 +1,6 @@ require 'net/ssh/transport/kex/diffie_hellman_group1_sha1' require 'net/ssh/transport/kex/diffie_hellman_group14_sha1' +require 'net/ssh/transport/kex/diffie_hellman_group14_sha256' require 'net/ssh/transport/kex/diffie_hellman_group_exchange_sha1' require 'net/ssh/transport/kex/diffie_hellman_group_exchange_sha256' require 'net/ssh/transport/kex/ecdh_sha2_nistp256' @@ -14,6 +15,7 @@ module Net::SSH::Transport MAP = { 'diffie-hellman-group1-sha1' => DiffieHellmanGroup1SHA1, 'diffie-hellman-group14-sha1' => DiffieHellmanGroup14SHA1, + 'diffie-hellman-group14-sha256' => DiffieHellmanGroup14SHA256, 'diffie-hellman-group-exchange-sha1' => DiffieHellmanGroupExchangeSHA1, 'diffie-hellman-group-exchange-sha256' => DiffieHellmanGroupExchangeSHA256, 'ecdh-sha2-nistp256' => EcdhSHA2NistP256, diff --git a/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb b/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb new file mode 100644 index 0000000..7fd985a --- /dev/null +++ b/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb @@ -0,0 +1,11 @@ +require 'net/ssh/transport/kex/diffie_hellman_group14_sha1' + +module Net::SSH::Transport::Kex + # A key-exchange service implementing the "diffie-hellman-group14-sha256" + # key-exchange algorithm. + class DiffieHellmanGroup14SHA256 < DiffieHellmanGroup14SHA1 + def digester + OpenSSL::Digest::SHA256 + end + end +end |