diff options
Diffstat (limited to 'lib/net/ssh/transport/kex.rb')
-rw-r--r-- | lib/net/ssh/transport/kex.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/net/ssh/transport/kex.rb b/lib/net/ssh/transport/kex.rb index 79a46a1..1cd059a 100644 --- a/lib/net/ssh/transport/kex.rb +++ b/lib/net/ssh/transport/kex.rb @@ -1,4 +1,5 @@ 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_group_exchange_sha1' require 'net/ssh/transport/kex/diffie_hellman_group_exchange_sha256' @@ -9,9 +10,19 @@ module Net::SSH::Transport MAP = { 'diffie-hellman-group-exchange-sha1' => DiffieHellmanGroupExchangeSHA1, 'diffie-hellman-group1-sha1' => DiffieHellmanGroup1SHA1, + 'diffie-hellman-group14-sha1' => DiffieHellmanGroup14SHA1, } if defined?(DiffieHellmanGroupExchangeSHA256) MAP['diffie-hellman-group-exchange-sha256'] = DiffieHellmanGroupExchangeSHA256 end + if defined?(OpenSSL::PKey::EC) + require 'net/ssh/transport/kex/ecdh_sha2_nistp256' + require 'net/ssh/transport/kex/ecdh_sha2_nistp384' + require 'net/ssh/transport/kex/ecdh_sha2_nistp521' + + MAP['ecdh-sha2-nistp256'] = EcdhSHA2NistP256 + MAP['ecdh-sha2-nistp384'] = EcdhSHA2NistP384 + MAP['ecdh-sha2-nistp521'] = EcdhSHA2NistP521 + end end end |