From 888be6133ccff1476cba139f1988c575e19d4561 Mon Sep 17 00:00:00 2001 From: Christopher Moore Date: Sat, 9 Jan 2016 13:45:23 +0000 Subject: [PATCH] KEx availability depends on OpenSSL support --- lib/net/ssh/transport/kex.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/net/ssh/transport/kex.rb b/lib/net/ssh/transport/kex.rb index 6f612d1112..6fca89c62d 100644 --- a/lib/net/ssh/transport/kex.rb +++ b/lib/net/ssh/transport/kex.rb @@ -10,7 +10,9 @@ module Net::SSH::Transport MAP = { 'diffie-hellman-group-exchange-sha1' => DiffieHellmanGroupExchangeSHA1, 'diffie-hellman-group1-sha1' => DiffieHellmanGroup1SHA1, - 'diffie-hellman-group-exchange-sha256' => DiffieHellmanGroupExchangeSHA256 } + if defined?(DiffieHellmanGroupExchangeSHA256) + MAP['diffie-hellman-group-exchange-sha256'] = DiffieHellmanGroupExchangeSHA256 + end end end