Skip to content

Commit

Permalink
Support our legacy target frameworks.
Browse files Browse the repository at this point in the history
  • Loading branch information
drieseng committed Dec 31, 2020
1 parent 68a47f6 commit a620835
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 10 deletions.
40 changes: 38 additions & 2 deletions src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
Expand Down Expand Up @@ -278,6 +281,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
Expand Down Expand Up @@ -1184,7 +1220,7 @@
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
Expand Down Expand Up @@ -1407,7 +1443,7 @@
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
<SilverlightProjectProperties />
</FlavorProperties>
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
40 changes: 38 additions & 2 deletions src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
Expand Down Expand Up @@ -284,6 +287,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
Expand Down Expand Up @@ -1190,7 +1226,7 @@
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
Expand Down Expand Up @@ -1411,7 +1447,7 @@
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
<SilverlightProjectProperties />
</FlavorProperties>
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
36 changes: 36 additions & 0 deletions src/Renci.SshNet.UAP10/Renci.SshNet.UAP10.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
Expand Down Expand Up @@ -327,6 +330,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
Expand Down
38 changes: 37 additions & 1 deletion src/Renci.SshNet.WindowsPhone/Renci.SshNet.WindowsPhone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
Expand Down Expand Up @@ -266,6 +269,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
Expand Down Expand Up @@ -1169,7 +1205,7 @@
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
Expand Down
38 changes: 37 additions & 1 deletion src/Renci.SshNet.WindowsPhone8/Renci.SshNet.WindowsPhone8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
<Link>Common\Pack.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
<Link>Common\PacketDump.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
<Link>Common\PipeStream.cs</Link>
</Compile>
Expand Down Expand Up @@ -307,6 +310,39 @@
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
<Link>Connection\ConnectorBase.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
<Link>Connection\DirectConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
<Link>Connection\HttpConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
<Link>Connection\IConnector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
<Link>Connection\IProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
<Link>Connection\ISocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
<Link>Connection\ProtocolVersionExchange.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
<Link>Connection\SocketFactory.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
<Link>Connection\Socks4Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
<Link>Connection\Socks5Connector.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
<Link>Connection\SshIdentification.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
<Link>ExpectAction.cs</Link>
</Compile>
Expand Down Expand Up @@ -1444,7 +1480,7 @@
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
4 changes: 2 additions & 2 deletions src/Renci.SshNet/Abstractions/SocketAbstraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ public static int Read(Socket socket, byte[] buffer, int offset, int size, TimeS
{
if (socket.ReceiveAsync(args))
{
if (!receiveCompleted.WaitOne(timeout))
if (!receiveCompleted.WaitOne(readTimeout))
throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
"Socket read operation has timed out after {0:F0} milliseconds.", timeout.TotalMilliseconds));
"Socket read operation has timed out after {0:F0} milliseconds.", readTimeout.TotalMilliseconds));
}
else
{
Expand Down
10 changes: 8 additions & 2 deletions src/Renci.SshNet/Common/PacketDump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ private static string AsHex(byte[] data, int length)

private static string AsAscii(byte[] data, int length)
{
var ascii = new StringBuilder();
#if FEATURE_ENCODING_ASCII
var encoding = Encoding.ASCII;
#else
var encoding = new ASCIIEncoding();
#endif

var ascii = new StringBuilder();
const char dot = '.';

for (var i = 0; i < length; i++)
Expand All @@ -92,7 +98,7 @@ private static string AsAscii(byte[] data, int length)
}
else
{
ascii.Append(Encoding.ASCII.GetString(data, i, 1));
ascii.Append(encoding.GetString(data, i, 1));
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/Renci.SshNet/Connection/Socks4Connector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ private static byte[] GetProxyUserBytes(string proxyUser)
return Array<byte>.Empty;
}

#if FEATURE_ENCODING_ASCII
return Encoding.ASCII.GetBytes(proxyUser);
#else
return new ASCIIEncoding().GetBytes(proxyUser);
#endif
}
}
}

0 comments on commit a620835

Please sign in to comment.