From 42a676c3d798e5fff92b0892ca96d80339e3213d Mon Sep 17 00:00:00 2001 From: Gert Driesen Date: Sun, 3 May 2020 21:15:09 +0200 Subject: [PATCH 1/4] Support TF without Socket.Poll(...) and Socket.Select(...). --- src/Renci.SshNet/Session.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Renci.SshNet/Session.cs b/src/Renci.SshNet/Session.cs index 89779685..de840f45 100644 --- a/src/Renci.SshNet/Session.cs +++ b/src/Renci.SshNet/Session.cs @@ -1935,9 +1935,10 @@ namespace Renci.SshNet break; } +#if FEATURE_SOCKET_POLL || FEATURE_SOCKET_SELECT try { - #if FEATURE_SOCKET_POLL +#if FEATURE_SOCKET_POLL // Block until either data is available or the socket is closed var connectionClosedOrDataAvailable = socket.Poll(-1, SelectMode.SelectRead); if (connectionClosedOrDataAvailable && socket.Available == 0) @@ -1945,7 +1946,7 @@ namespace Renci.SshNet // connection with SSH server was closed or connection was reset break; } - #elif FEATURE_SOCKET_SELECT +#elif FEATURE_SOCKET_SELECT var readSockets = new List { socket }; // if the socket is already disposed when Select is invoked, then a SocketException @@ -1981,10 +1982,7 @@ namespace Renci.SshNet // break out of the message loop break; } - #else - #error Blocking wait on either socket data to become available or connection to be - #error closed is not implemented. - #endif // FEATURE_SOCKET_SELECT +#endif // FEATURE_SOCKET_SELECT } catch (ObjectDisposedException) { @@ -1994,6 +1992,7 @@ namespace Renci.SshNet // * a SSH_MSG_DISCONNECT received from server break; } +#endif // FEATURE_SOCKET_POLL || FEATURE_SOCKET_SELECT var message = ReceiveMessage(socket); if (message == null) From e44913029e341329f8b8e3612025146927b4f28f Mon Sep 17 00:00:00 2001 From: Gert Driesen Date: Sun, 3 May 2020 21:18:49 +0200 Subject: [PATCH 2/4] Synchronize legacy project files. --- .../Renci.SshNet.Silverlight.csproj | 18 ++++++++++++++++ .../Renci.SshNet.Silverlight5.csproj | 20 +++++++++++++++++- .../Renci.SshNet.UAP10.csproj | 21 ++++++++++++++++--- .../Renci.SshNet.WindowsPhone.csproj | 18 ++++++++++++++++ .../Renci.SshNet.WindowsPhone8.csproj | 20 +++++++++++++++++- 5 files changed, 92 insertions(+), 5 deletions(-) diff --git a/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj b/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj index 8e579ab1..6769eabf 100644 --- a/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj +++ b/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj @@ -1121,6 +1121,12 @@ Security\KeyExchangeDiffieHellmanGroup14Sha1.cs + + Security\KeyExchangeDiffieHellmanGroup14Sha256.cs + + + Security\KeyExchangeDiffieHellmanGroup16Sha512.cs + Security\KeyExchangeDiffieHellmanGroup1Sha1.cs @@ -1136,6 +1142,15 @@ Security\KeyExchangeDiffieHellmanGroupSha1.cs + + Security\KeyExchangeDiffieHellmanGroupSha256.cs + + + Security\KeyExchangeDiffieHellmanGroupSha512.cs + + + Security\KeyExchangeDiffieHellmanGroupShaBase.cs + Security\KeyExchangeEC.cs @@ -1154,6 +1169,9 @@ Security\KeyExchangeECDH521.cs + + Security\KeyExchangeHash.cs + Security\KeyHostAlgorithm.cs diff --git a/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj b/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj index 30e4f2b8..6892d3b6 100644 --- a/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj +++ b/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj @@ -1127,6 +1127,12 @@ Security\KeyExchangeDiffieHellmanGroup14Sha1.cs + + Security\KeyExchangeDiffieHellmanGroup14Sha256.cs + + + Security\KeyExchangeDiffieHellmanGroup16Sha512.cs + Security\KeyExchangeDiffieHellmanGroup1Sha1.cs @@ -1142,6 +1148,15 @@ Security\KeyExchangeDiffieHellmanGroupSha1.cs + + Security\KeyExchangeDiffieHellmanGroupSha256.cs + + + Security\KeyExchangeDiffieHellmanGroupSha512.cs + + + Security\KeyExchangeDiffieHellmanGroupShaBase.cs + Security\KeyExchangeEC.cs @@ -1160,6 +1175,9 @@ Security\KeyExchangeECDH521.cs + + Security\KeyExchangeHash.cs + Security\KeyHostAlgorithm.cs @@ -1390,7 +1408,7 @@ - +