From 8c4e3119ef147edcdf820a8d517d2ca96aae331f Mon Sep 17 00:00:00 2001 From: Gert Driesen Date: Wed, 7 May 2014 18:21:30 +0000 Subject: [PATCH] Support an acceptable group of up to 8192 bits for SHA-1 and SHA-256 Diffie-Hellman Group and Key Exchange (issue #1973 and #1777), and refactor corresponding classes to avoid code duplication. --- Renci.SshClient/Build/nuget/SSH.NET.nuspec | 1 + .../Renci.SshNet.NET35.csproj | 8 +- .../Renci.SshNet.Silverlight.csproj | 8 +- .../Renci.SshNet.Silverlight5.csproj | 8 +- .../Renci.SshNet.WindowsPhone.csproj | 6 + .../Renci.SshNet.WindowsPhone8.csproj | 8 +- .../Renci.SshNet/Renci.SshNet.csproj | 2 + .../Security/GroupExchangeHashData.cs | 56 +++++++ ...yExchangeDiffieHellmanGroupExchangeSha1.cs | 149 +----------------- ...xchangeDiffieHellmanGroupExchangeSha256.cs | 148 +---------------- ...changeDiffieHellmanGroupExchangeShaBase.cs | 102 ++++++++++++ 11 files changed, 199 insertions(+), 297 deletions(-) create mode 100644 Renci.SshClient/Renci.SshNet/Security/GroupExchangeHashData.cs create mode 100644 Renci.SshClient/Renci.SshNet/Security/KeyExchangeDiffieHellmanGroupExchangeShaBase.cs diff --git a/Renci.SshClient/Build/nuget/SSH.NET.nuspec b/Renci.SshClient/Build/nuget/SSH.NET.nuspec index 6f2a5875..2ca9aac6 100644 --- a/Renci.SshClient/Build/nuget/SSH.NET.nuspec +++ b/Renci.SshClient/Build/nuget/SSH.NET.nuspec @@ -17,6 +17,7 @@ New Features: * Improved accuracy of IsConnected on .NET * Added support for ssh.com (SSH-2) private keys (issue #1987) + * Support an acceptable group of up to 8192 bits for SHA-1 and SHA-256 Diffie-Hellman Group and Key Exchange (issue #1973 and #1777) Fixes: diff --git a/Renci.SshClient/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj b/Renci.SshClient/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj index 49a3fa08..520337a5 100644 --- a/Renci.SshClient/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj +++ b/Renci.SshClient/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj @@ -648,6 +648,9 @@ Security\Cryptography\SymmetricCipher.cs + + Security\GroupExchangeHashData.cs + Security\HostAlgorithm.cs @@ -669,6 +672,9 @@ Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs + + Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs + Security\KeyExchangeDiffieHellmanGroupSha1.cs @@ -889,7 +895,7 @@ - +