diff --git a/README.md b/README.md
index f58d2e7e..2eacd873 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,29 @@
-SSH.NET
+SSH.NET
=======
SSH.NET is a Secure Shell (SSH-2) library for .NET, optimized for parallelism.
[](https://www.nuget.org/packages/SSH.NET)
+[](https://www.nuget.org/packages/SSH.NET)
[](https://ci.appveyor.com/api/projects/status/ih77qu6tap3o92gu/branch/develop)
## Introduction
-This project was inspired by **Sharp.SSH** library which was ported from java and it seems like was not supported for quite some time. This library is a complete rewrite, without any third party dependencies, using parallelism to achieve the best performance possible.
+This project was inspired by **Sharp.SSH** library which was ported from java and it seems like was not supported
+for quite some time. This library is a complete rewrite, without any third party dependencies, using parallelism
+to achieve the best performance possible.
+
+## Documentation
+There is MSDN-style class documentation in a .chm file for each release, which you can find in the Assets section
+of the [latest release](https://github.com/sshnet/SSH.NET/releases/latest) page. Please note that you will need
+to [right-click and "unblock"](https://support.microsoft.com/en-us/help/2021383/some-chm-files-may-not-render-properly-on-windows-vista-and-windows-7)
+the CHM file after you download it.
+
+Currently (4/18/2020), the documentation is very sparse. Fortunately, there are a large number of tests in
+[Renci.SshNet.Tests](https://github.com/sshnet/SSH.NET/tree/develop/src/Renci.SshNet.Tests) that demonstrate
+usage with working code.
+
+If the test for the functionality you would like to see documented is not complete, then you are cordially
+invited to read the source, Luke, and highly encouraged to generate a pull request for the implementation of
+the missing test once you figure things out. 🤓
## Features
* Execution of SSH command using both synchronous and asynchronous methods
@@ -17,22 +34,72 @@ This project was inspired by **Sharp.SSH** library which was ported from java an
* Remote, dynamic and local port forwarding
* Shell/Terminal implementation
* Specify key file pass phrase
-* Use multiple key files to authenticate
-* Supports 3des-cbc, aes128-cbc, aes192-cbc, aes256-cbc, aes128-ctr, aes192-ctr, aes256-ctr, blowfish-cbc, cast128-cbc, arcfour and twofish encryptions
+* Use multiple key files to authenticate
* Supports publickey, password and keyboard-interactive authentication methods
-* Supports RSA and DSA private key
-* Supports DES-EDE3-CBC, DES-EDE3-CFB, DES-CBC, AES-128-CBC, AES-192-CBC and AES-256-CBC algorithms for private key encryption
* Supports two-factor or higher authentication
* Supports SOCKS4, SOCKS5 and HTTP Proxy
+## Encryption Method
+
+**SSH.NET** supports the following encryption methods:
+* aes256-ctr
+* 3des-cbc
+* aes128-cbc
+* aes192-cbc
+* aes256-cbc
+* blowfish-cbc
+* twofish-cbc
+* twofish192-cbc
+* twofish128-cbc
+* twofish256-cbc
+* arcfour
+* arcfour128
+* arcfour256
+* cast128-cbc
+* aes128-ctr
+* aes192-ctr
+
## Key Exchange Method
**SSH.NET** supports the following key exchange methods:
+* curve25519-sha256
+* curve25519-sha256@libssh.org
+* ecdh-sha2-nistp256
+* ecdh-sha2-nistp384
+* ecdh-sha2-nistp521
* diffie-hellman-group-exchange-sha256
* diffie-hellman-group-exchange-sha1
+* diffie-hellman-group16-sha512
+* diffie-hellman-group14-sha256
* diffie-hellman-group14-sha1
* diffie-hellman-group1-sha1
+## Public Key Authentication
+
+**SSH.NET** supports the following private key formats:
+* RSA in OpenSSL PEM and ssh.com format
+* DSA in OpenSSL PEM and ssh.com format
+* ECDSA 256/384/521 in OpenSSL PEM format
+* ED25519 in OpenSSH key format
+
+Private keys can be encrypted using one of the following cipher methods:
+* DES-EDE3-CBC
+* DES-EDE3-CFB
+* DES-CBC
+* AES-128-CBC
+* AES-192-CBC
+* AES-256-CBC
+
+## Host Key Algorithms
+
+**SSH.NET** supports the following host key algorithms:
+* ssh-ed25519
+* ecdsa-sha2-nistp256
+* ecdsa-sha2-nistp384
+* ecdsa-sha2-nistp521
+* ssh-rsa
+* ssh-dss
+
## Message Authentication Code
**SSH.NET** supports the following MAC algorithms:
@@ -45,7 +112,7 @@ This project was inspired by **Sharp.SSH** library which was ported from java an
* hmac-sha2-512
* hmac-sha2-512-96
* hmac-ripemd160
-* hmac-ripemd160@openssh.com
+* hmac-ripemd160@openssh.com
## Framework Support
**SSH.NET** supports the following target frameworks:
diff --git a/THIRD-PARTY-NOTICES.TXT b/THIRD-PARTY-NOTICES.TXT
new file mode 100644
index 00000000..1cacf79e
--- /dev/null
+++ b/THIRD-PARTY-NOTICES.TXT
@@ -0,0 +1,73 @@
+SSH.NET uses third-party libraries or other resources that may be
+distributed under licenses different than the SSH.NET software.
+
+License notice for BouncyCastle
+-------------------------------
+
+http://bouncycastle.org/csharp
+
+Copyright (c) 2000 - 2018 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License notice for Chaos.NaCl
+-------------------------------
+
+https://github.com/CodesInChaos/Chaos.NaCl
+
+Public domain
+
+C# port + code by Christian Winnerlein (CodesInChaos)
+
+Poly1305 in c
+ written by Andrew M. (floodyberry)
+ original license: MIT or PUBLIC DOMAIN
+ https://github.com/floodyberry/poly1305-donna/blob/master/poly1305-donna-unrolled.c
+
+Curve25519 and Ed25519 in c
+ written by Dan Bernstein (djb)
+ public domain
+ from Ref10 in SUPERCOP http://bench.cr.yp.to/supercop.html
+
+(H)Salsa20 in c
+ written by Dan Bernstein (djb)
+ public domain
+ from SUPERCOP http://bench.cr.yp.to/supercop.html
+
+SHA512
+ written by Christian Winnerlein (CodesInChaos)
+ public domain
+ directly from the specification
+
+License notice for BCrypt
+-------------------------
+
+Copyright (c) 2006 Damien Miller
+Copyright (c) 2010 Ryan D. Emerle
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/appveyor.yml b/appveyor.yml
index ab8e88d5..c5bb4a18 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,14 +1,14 @@
-os: Visual Studio 2015
+os: Visual Studio 2019
before_build:
- - nuget restore src\Renci.SshNet.VS2015.sln
+ - nuget restore src\Renci.SshNet.VS2019.sln
build:
- project: src\Renci.SshNet.VS2015.sln
+ project: src\Renci.SshNet.VS2019.sln
verbosity: minimal
test_script:
- cmd: >-
- vstest.console /logger:Appveyor src\Renci.SshNet.Tests\bin\Debug\Renci.SshNet.Tests.dll /TestCaseFilter:"TestCategory!=integration&TestCategory!=LongRunning"
+ vstest.console /logger:Appveyor src\Renci.SshNet.Tests\bin\Debug\net40\Renci.SshNet.Tests.dll /TestCaseFilter:"TestCategory!=integration&TestCategory!=LongRunning"
- vstest.console /logger:Appveyor src\Renci.SshNet.Tests.NET35\bin\Debug\Renci.SshNet.Tests.NET35.dll /TestCaseFilter:"TestCategory!=integration&TestCategory!=LongRunning"
\ No newline at end of file
+ vstest.console /logger:Appveyor src\Renci.SshNet.Tests\bin\Debug\net35\Renci.SshNet.Tests.dll /TestCaseFilter:"TestCategory!=integration&TestCategory!=LongRunning"
\ No newline at end of file
diff --git a/build/build.cmd b/build/build.cmd
deleted file mode 100644
index 146c26fb..00000000
--- a/build/build.cmd
+++ /dev/null
@@ -1,12 +0,0 @@
-@echo off
-
-set MSBUILD14_EXE=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
-set MSBUILD15_EXE=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\\MSBuild\15.0\bin\MSBuild.exe
-
-call "%MSBUILD14_EXE%" build.proj /t:Clean
-call "%MSBUILD15_EXE%" build.proj /t:Clean
-
-call "%MSBUILD14_EXE%" build.proj /t:Build
-call "%MSBUILD15_EXE%" build.proj /t:Build
-
-call "%MSBUILD15_EXE%" build.proj /t:Package /p:ReleaseVersion=%1
\ No newline at end of file
diff --git a/build/build.proj b/build/build.proj
index 96708a6c..fd5a96ed 100644
--- a/build/build.proj
+++ b/build/build.proj
@@ -1,5 +1,5 @@
-
+
Release
@@ -8,128 +8,214 @@
MSBuildTasks
1.5.0.214
+
-
+
$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2012.sln
- 14.0
- true
-
-
+ 14.0
+ 14.0
+
+
$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2015.sln
- 14.0
- true
-
-
- $(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2017.sln
- 15.0
-
+ 14.0
+ 14.0
+
+
-
- Renci.SshNet.NET35\bin\$(Configuration)
- net35
-
-
- Renci.SshNet\bin\$(Configuration)
- net40
-
-
- Renci.SshNet.NETCore\bin\$(Configuration)\netstandard1.3
- netstandard1.3
-
-
+
+ $(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2019.sln
+ 16.0
+
+
+
+
+
Renci.SshNet.WindowsPhone\bin\$(Configuration)
wp71
-
-
+
+
Renci.SshNet.WindowsPhone8\bin\$(Configuration)
wp8
-
-
+
+
Renci.SshNet.Silverlight\bin\$(Configuration)
sl4
-
-
+
+
Renci.SshNet.Silverlight5\bin\$(Configuration)
sl5
-
-
+
+
Renci.SshNet.UAP10\bin\$(Configuration)
uap10
-
+
-
+
+
+
+ Renci.SshNet\bin\$(Configuration)\net35
+ net35
+
+
+ Renci.SshNet\bin\$(Configuration)\net40
+ net40
+
+
+ Renci.SshNet\bin\$(Configuration)\netstandard1.3
+ netstandard1.3
+
+
+ Renci.SshNet\bin\$(Configuration)\netstandard2.0
+ netstandard2.0
+
+
+
+
+
+
+
+
+
+
+
-
- Configuration=Release
+
+ Configuration=Release;VisualStudioVersion=%(VisualStudioVersionClassic.VisualStudioVersion)
-
+
+
+
+
+
+
+ Configuration=Release;VisualStudioVersion=%(VisualStudioVersionModern.VisualStudioVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration=Release;VisualStudioVersion=%(VisualStudioVersionClassic.VisualStudioVersion)
+
+
+
+
+
+
+
+
+
+ Configuration=Release;VisualStudioVersion=%(VisualStudioVersionModern.VisualStudioVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- Configuration=Release
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ $(MSBuildThisFileDirectory)target\nuget-$(ReleaseVersion)
+
+
+
+
+
+ $(MSBuildThisFileDirectory)target\bin-$(ReleaseVersion)
+
+
+
diff --git a/build/nuget/SSH.NET.nuspec b/build/nuget/SSH.NET.nuspec
index 12bffe81..03830583 100644
--- a/build/nuget/SSH.NET.nuspec
+++ b/build/nuget/SSH.NET.nuspec
@@ -2,7 +2,7 @@
SSH.NET
- 2016.1.0
+ $version$
SSH.NET
Renci
olegkap,drieseng
@@ -10,53 +10,43 @@
https://github.com/sshnet/SSH.NET/
false
SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism and with broad framework support.
- https://github.com/sshnet/SSH.NET/releases/tag/2016.1.0
+ https://github.com/sshnet/SSH.NET/releases/tag/$version$
A Secure Shell (SSH) library for .NET, optimized for parallelism.
- 2012-2017, RENCI
+ $copyright$
en-US
ssh scp sftp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
+
+
diff --git a/build/sandcastle/SSH.NET.shfbproj b/build/sandcastle/SSH.NET.shfbproj
index dbd43088..50141f16 100644
--- a/build/sandcastle/SSH.NET.shfbproj
+++ b/build/sandcastle/SSH.NET.shfbproj
@@ -41,8 +41,8 @@
-
-
+
+
Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose
OnlyWarningsAndErrors
diff --git a/runtest.cmd b/runtest.cmd
new file mode 100644
index 00000000..ad4c0f5a
--- /dev/null
+++ b/runtest.cmd
@@ -0,0 +1,3 @@
+rem vstest.console src\Renci.SshNet.Tests\bin\Debug\net40\Renci.SshNet.Tests.dll "/TestCaseFilter:TestCategory=Gert
+
+vstest.console src\Renci.SshNet.Tests\bin\Debug\net40\Renci.SshNet.Tests.dll /TestCaseFilter:"TestCategory!=integration&TestCategory!=LongRunning"
\ No newline at end of file
diff --git a/src/References/How the SCP protocol works.pdf b/src/References/How the SCP protocol works.pdf
new file mode 100644
index 00000000..74728daa
Binary files /dev/null and b/src/References/How the SCP protocol works.pdf differ
diff --git a/src/Renci.SshNet.NET35/Common/Extensions.NET35.cs b/src/Renci.SshNet.NET35/Common/Extensions.NET35.cs
deleted file mode 100644
index ed198c00..00000000
--- a/src/Renci.SshNet.NET35/Common/Extensions.NET35.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.Security.Cryptography;
-using System.Text;
-
-namespace Renci.SshNet.Common
-{
- ///
- /// Collection of different extension method specific for .NET 3.5
- ///
- internal static partial class Extensions
- {
- ///
- /// Disposes the specified algorithm.
- ///
- /// The algorithm.
- [DebuggerNonUserCode]
- internal static void Dispose(this HashAlgorithm algorithm)
- {
- if (algorithm == null)
- throw new NullReferenceException();
-
- algorithm.Clear();
- }
-
- ///
- /// Clears the contents of the string builder.
- ///
- ///
- /// The to clear.
- ///
- public static void Clear(this StringBuilder value)
- {
- value.Length = 0;
- value.Capacity = 16;
- }
- }
-}
diff --git a/src/Renci.SshNet.NET35/Properties/AssemblyInfo.cs b/src/Renci.SshNet.NET35/Properties/AssemblyInfo.cs
deleted file mode 100644
index 9b3fcd24..00000000
--- a/src/Renci.SshNet.NET35/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("SSH.NET .NET 3.5")]
-[assembly: Guid("a9698831-4993-469b-81f1-aed4e5379252")]
-[assembly: InternalsVisibleTo("Renci.SshNet.Tests.NET35, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f9194e1eb66b7e2575aaee115ee1d27bc100920e7150e43992d6f668f9737de8b9c7ae892b62b8a36dd1d57929ff1541665d101dc476d6e02390846efae7e5186eec409710fdb596e3f83740afef0d4443055937649bc5a773175b61c57615dac0f0fd10f52b52fedf76c17474cc567b3f7a79de95dde842509fb39aaf69c6c2")]
-[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
\ No newline at end of file
diff --git a/src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj b/src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj
deleted file mode 100644
index a6878d18..00000000
--- a/src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj
+++ /dev/null
@@ -1,984 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}
- Library
- Properties
- Renci.SshNet
- Renci.SshNet
- v3.5
- 512
-
-
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG;FEATURE_REGEX_COMPILE;FEATURE_BINARY_SERIALIZATION;FEATURE_RNG_CREATE;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_EAP;FEATURE_SOCKET_APM;FEATURE_SOCKET_SETSOCKETOPTION;FEATURE_SOCKET_POLL;FEATURE_STREAM_APM;FEATURE_DNS_SYNC;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_HASH_MD5;FEATURE_HASH_SHA1_CREATE;FEATURE_HASH_SHA256_CREATE;FEATURE_HASH_SHA384_CREATE;FEATURE_HASH_SHA512_CREATE;FEATURE_HASH_RIPEMD160_CREATE;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_ENCODING_ASCII
- prompt
- 4
- true
- bin\Debug\Renci.SshNet.xml
- 5
-
-
- none
- true
- bin\Release\
- TRACE;FEATURE_REGEX_COMPILE;FEATURE_BINARY_SERIALIZATION;FEATURE_RNG_CREATE;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_EAP;FEATURE_SOCKET_APM;FEATURE_SOCKET_SETSOCKETOPTION;FEATURE_SOCKET_POLL;FEATURE_STREAM_APM;FEATURE_DNS_SYNC;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_HASH_MD5;FEATURE_HASH_SHA1_CREATE;FEATURE_HASH_SHA256_CREATE;FEATURE_HASH_SHA384_CREATE;FEATURE_HASH_SHA512_CREATE;FEATURE_HASH_RIPEMD160_CREATE;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_ENCODING_ASCII
- prompt
- 4
- bin\Release\Renci.SshNet.xml
-
-
- true
- 5
-
-
- true
-
-
- ..\Renci.SshNet.snk
-
-
-
-
-
-
-
-
- Abstractions\CryptoAbstraction.cs
-
-
- Abstractions\DiagnosticAbstraction.cs
-
-
- Abstractions\DnsAbstraction.cs
-
-
- Abstractions\FileSystemAbstraction.cs
-
-
- Abstractions\ReflectionAbstraction.cs
-
-
- Abstractions\SocketAbstraction.cs
-
-
- Abstractions\ThreadAbstraction.cs
-
-
- AuthenticationMethod.cs
-
-
- AuthenticationResult.cs
-
-
- BaseClient.cs
-
-
- Channels\Channel.cs
-
-
- Channels\ChannelDirectTcpip.cs
-
-
- Channels\ChannelForwardedTcpip.cs
-
-
- Channels\ChannelSession.cs
-
-
- Channels\ChannelTypes.cs
-
-
- Channels\ClientChannel.cs
-
-
- Channels\IChannel.cs
-
-
- Channels\IChannelDirectTcpip.cs
-
-
- Channels\IChannelForwardedTcpip.cs
-
-
- Channels\IChannelSession.cs
-
-
- Channels\ServerChannel.cs
-
-
- CipherInfo.cs
-
-
- ClientAuthentication.cs
-
-
- CommandAsyncResult.cs
-
-
- Common\Array.cs
-
-
- Common\ASCIIEncoding.cs
-
-
- Common\AsyncResult.cs
-
-
- Common\AuthenticationBannerEventArgs.cs
-
-
- Common\AuthenticationEventArgs.cs
-
-
- Common\AuthenticationPasswordChangeEventArgs.cs
-
-
- Common\AuthenticationPrompt.cs
-
-
- Common\AuthenticationPromptEventArgs.cs
-
-
- Common\BigInteger.cs
-
-
- Common\ChannelDataEventArgs.cs
-
-
- Common\ChannelEventArgs.cs
-
-
- Common\ChannelExtendedDataEventArgs.cs
-
-
- Common\ChannelOpenConfirmedEventArgs.cs
-
-
- Common\ChannelOpenFailedEventArgs.cs
-
-
- Common\ChannelRequestEventArgs.cs
-
-
- Common\CountdownEvent.cs
-
-
- Common\DerData.cs
-
-
- Common\ExceptionEventArgs.cs
-
-
- Common\Extensions.cs
-
-
- Common\HostKeyEventArgs.cs
-
-
- Common\NetConfServerException.cs
-
-
- Common\ObjectIdentifier.cs
-
-
- Common\Pack.cs
-
-
- Common\PipeStream.cs
-
-
- Common\PortForwardEventArgs.cs
-
-
- Common\PosixPath.cs
-
-
- Common\ProxyException.cs
-
-
- Common\ScpDownloadEventArgs.cs
-
-
- Common\ScpException.cs
-
-
- Common\ScpUploadEventArgs.cs
-
-
- Common\SemaphoreLight.cs
-
-
- Common\SftpPathNotFoundException.cs
-
-
- Common\SftpPermissionDeniedException.cs
-
-
- Common\ShellDataEventArgs.cs
-
-
- Common\SshAuthenticationException.cs
-
-
- Common\SshConnectionException.cs
-
-
- Common\SshData.cs
-
-
- Common\SshDataStream.cs
-
-
- Common\SshException.cs
-
-
- Common\SshOperationTimeoutException.cs
-
-
- Common\SshPassPhraseNullOrEmptyException.cs
-
-
- Common\TerminalModes.cs
-
-
- Compression\CompressionMode.cs
-
-
- Compression\Compressor.cs
-
-
- Compression\Zlib.cs
-
-
- Compression\ZlibOpenSsh.cs
-
-
- Compression\ZlibStream.cs
-
-
- ConnectionInfo.cs
-
-
- ExpectAction.cs
-
-
- ExpectAsyncResult.cs
-
-
- ForwardedPort.cs
-
-
- ForwardedPortDynamic.cs
-
-
- ForwardedPortDynamic.NET.cs
-
-
- ForwardedPortLocal.cs
-
-
- ForwardedPortLocal.NET.cs
-
-
- ForwardedPortRemote.cs
-
-
- ForwardedPortStatus.cs
-
-
- HashInfo.cs
-
-
- IAuthenticationMethod.cs
-
-
- IClientAuthentication.cs
-
-
- IConnectionInfo.cs
-
-
- IForwardedPort.cs
-
-
- IRemotePathTransformation.cs
-
-
- IServiceFactory.cs
-
-
- IServiceFactory.NET.cs
-
-
- ISession.cs
-
-
- ISubsystemSession.cs
-
-
- KeyboardInteractiveAuthenticationMethod.cs
-
-
- KeyboardInteractiveConnectionInfo.cs
-
-
- MessageEventArgs.cs
-
-
- Messages\Authentication\BannerMessage.cs
-
-
- Messages\Authentication\FailureMessage.cs
-
-
- Messages\Authentication\InformationRequestMessage.cs
-
-
- Messages\Authentication\InformationResponseMessage.cs
-
-
- Messages\Authentication\PasswordChangeRequiredMessage.cs
-
-
- Messages\Authentication\PublicKeyMessage.cs
-
-
- Messages\Authentication\RequestMessage.cs
-
-
- Messages\Authentication\RequestMessageHost.cs
-
-
- Messages\Authentication\RequestMessageKeyboardInteractive.cs
-
-
- Messages\Authentication\RequestMessageNone.cs
-
-
- Messages\Authentication\RequestMessagePassword.cs
-
-
- Messages\Authentication\RequestMessagePublicKey.cs
-
-
- Messages\Authentication\SuccessMessage.cs
-
-
- Messages\Connection\CancelTcpIpForwardGlobalRequestMessage.cs
-
-
- Messages\Connection\ChannelCloseMessage.cs
-
-
- Messages\Connection\ChannelDataMessage.cs
-
-
- Messages\Connection\ChannelEofMessage.cs
-
-
- Messages\Connection\ChannelExtendedDataMessage.cs
-
-
- Messages\Connection\ChannelFailureMessage.cs
-
-
- Messages\Connection\ChannelMessage.cs
-
-
- Messages\Connection\ChannelOpenConfirmationMessage.cs
-
-
- Messages\Connection\ChannelOpenFailureMessage.cs
-
-
- Messages\Connection\ChannelOpenFailureReasons.cs
-
-
- Messages\Connection\ChannelOpen\ChannelOpenInfo.cs
-
-
- Messages\Connection\ChannelOpen\ChannelOpenMessage.cs
-
-
- Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs
-
-
- Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs
-
-
- Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs
-
-
- Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs
-
-
- Messages\Connection\ChannelRequest\BreakRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\ChannelRequestMessage.cs
-
-
- Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\ExecRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs
-
-
- Messages\Connection\ChannelRequest\RequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\ShellRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\SignalRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs
-
-
- Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs
-
-
- Messages\Connection\ChannelSuccessMessage.cs
-
-
- Messages\Connection\ChannelWindowAdjustMessage.cs
-
-
- Messages\Connection\GlobalRequestMessage.cs
-
-
- Messages\Connection\GlobalRequestName.cs
-
-
- Messages\Connection\RequestFailureMessage.cs
-
-
- Messages\Connection\RequestSuccessMessage.cs
-
-
- Messages\Connection\TcpIpForwardGlobalRequestMessage.cs
-
-
- Messages\Message.cs
-
-
- Messages\MessageAttribute.cs
-
-
- Messages\ServiceName.cs
-
-
- Messages\Transport\DebugMessage.cs
-
-
- Messages\Transport\DisconnectMessage.cs
-
-
- Messages\Transport\DisconnectReason.cs
-
-
- Messages\Transport\IgnoreMessage.cs
-
-
- Messages\Transport\IKeyExchangedAllowed.cs
-
-
- Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs
-
-
- Messages\Transport\KeyExchangeDhGroupExchangeInit.cs
-
-
- Messages\Transport\KeyExchangeDhGroupExchangeReply.cs
-
-
- Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs
-
-
- Messages\Transport\KeyExchangeDhInitMessage.cs
-
-
- Messages\Transport\KeyExchangeDhReplyMessage.cs
-
-
- Messages\Transport\KeyExchangeEcdhInitMessage.cs
-
-
- Messages\Transport\KeyExchangeEcdhReplyMessage.cs
-
-
- Messages\Transport\KeyExchangeInitMessage.cs
-
-
- Messages\Transport\NewKeysMessage.cs
-
-
- Messages\Transport\ServiceAcceptMessage.cs
-
-
- Messages\Transport\ServiceRequestMessage.cs
-
-
- Messages\Transport\UnimplementedMessage.cs
-
-
- NetConfClient.cs
-
-
- Netconf\INetConfSession.cs
-
-
- Netconf\NetConfSession.cs
-
-
- NoneAuthenticationMethod.cs
-
-
- PasswordAuthenticationMethod.cs
-
-
- PasswordConnectionInfo.cs
-
-
- PrivateKeyAuthenticationMethod.cs
-
-
- PrivateKeyConnectionInfo.cs
-
-
- PrivateKeyFile.cs
-
-
- ProxyTypes.cs
-
-
- RemotePathDoubleQuoteTransformation.cs
-
-
- RemotePathNoneTransformation.cs
-
-
- RemotePathShellQuoteTransformation.cs
-
-
- RemotePathTransformation.cs
-
-
- ScpClient.cs
-
-
- ScpClient.NET.cs
-
-
- Security\Algorithm.cs
-
-
- Security\CertificateHostAlgorithm.cs
-
-
- Security\Cryptography\AsymmetricCipher.cs
-
-
- Security\Cryptography\BlockCipher.cs
-
-
- Security\Cryptography\Cipher.cs
-
-
- Security\Cryptography\CipherDigitalSignature.cs
-
-
- Security\Cryptography\Ciphers\AesCipher.cs
-
-
- Security\Cryptography\Ciphers\Arc4Cipher.cs
-
-
- Security\Cryptography\Ciphers\BlowfishCipher.cs
-
-
- Security\Cryptography\Ciphers\CastCipher.cs
-
-
- Security\Cryptography\Ciphers\CipherMode.cs
-
-
- Security\Cryptography\Ciphers\CipherPadding.cs
-
-
- Security\Cryptography\Ciphers\DesCipher.cs
-
-
- Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs
-
-
- Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs
-
-
- Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs
-
-
- Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs
-
-
- Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs
-
-
- Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs
-
-
- Security\Cryptography\Ciphers\RsaCipher.cs
-
-
- Security\Cryptography\Ciphers\SerpentCipher.cs
-
-
- Security\Cryptography\Ciphers\TripleDesCipher.cs
-
-
- Security\Cryptography\Ciphers\TwofishCipher.cs
-
-
- Security\Cryptography\DigitalSignature.cs
-
-
- Security\Cryptography\DsaDigitalSignature.cs
-
-
- Security\Cryptography\DsaKey.cs
-
-
- Security\Cryptography\HMACMD5.cs
-
-
- Security\Cryptography\HMACSHA1.cs
-
-
- Security\Cryptography\HMACSHA256.cs
-
-
- Security\Cryptography\HMACSHA384.cs
-
-
- Security\Cryptography\HMACSHA512.cs
-
-
- Security\Cryptography\Key.cs
-
-
- Security\Cryptography\RsaDigitalSignature.cs
-
-
- Security\Cryptography\RsaKey.cs
-
-
- Security\Cryptography\StreamCipher.cs
-
-
- Security\Cryptography\SymmetricCipher.cs
-
-
- Security\GroupExchangeHashData.cs
-
-
- Security\HostAlgorithm.cs
-
-
- Security\IKeyExchange.cs
-
-
- Security\KeyExchange.cs
-
-
- Security\KeyExchangeDiffieHellman.cs
-
-
- Security\KeyExchangeDiffieHellmanGroup14Sha1.cs
-
-
- Security\KeyExchangeDiffieHellmanGroup1Sha1.cs
-
-
- Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs
-
-
- Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs
-
-
- Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs
-
-
- Security\KeyExchangeDiffieHellmanGroupSha1.cs
-
-
- Security\KeyHostAlgorithm.cs
-
-
- ServiceFactory.cs
-
-
- ServiceFactory.NET.cs
-
-
- Session.cs
-
-
- SftpClient.cs
-
-
- Sftp\Flags.cs
-
-
- Sftp\ISftpFileReader.cs
-
-
- Sftp\ISftpResponseFactory.cs
-
-
- Sftp\ISftpSession.cs
-
-
- Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs
-
-
- Sftp\Requests\ExtendedRequests\HardLinkRequest.cs
-
-
- Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs
-
-
- Sftp\Requests\ExtendedRequests\StatVfsRequest.cs
-
-
- Sftp\Requests\SftpBlockRequest.cs
-
-
- Sftp\Requests\SftpCloseRequest.cs
-
-
- Sftp\Requests\SftpExtendedRequest.cs
-
-
- Sftp\Requests\SftpFSetStatRequest.cs
-
-
- Sftp\Requests\SftpFStatRequest.cs
-
-
- Sftp\Requests\SftpInitRequest.cs
-
-
- Sftp\Requests\SftpLinkRequest.cs
-
-
- Sftp\Requests\SftpLStatRequest.cs
-
-
- Sftp\Requests\SftpMkDirRequest.cs
-
-
- Sftp\Requests\SftpOpenDirRequest.cs
-
-
- Sftp\Requests\SftpOpenRequest.cs
-
-
- Sftp\Requests\SftpReadDirRequest.cs
-
-
- Sftp\Requests\SftpReadLinkRequest.cs
-
-
- Sftp\Requests\SftpReadRequest.cs
-
-
- Sftp\Requests\SftpRealPathRequest.cs
-
-
- Sftp\Requests\SftpRemoveRequest.cs
-
-
- Sftp\Requests\SftpRenameRequest.cs
-
-
- Sftp\Requests\SftpRequest.cs
-
-
- Sftp\Requests\SftpRmDirRequest.cs
-
-
- Sftp\Requests\SftpSetStatRequest.cs
-
-
- Sftp\Requests\SftpStatRequest.cs
-
-
- Sftp\Requests\SftpSymLinkRequest.cs
-
-
- Sftp\Requests\SftpUnblockRequest.cs
-
-
- Sftp\Requests\SftpWriteRequest.cs
-
-
- Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs
-
-
- Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs
-
-
- Sftp\Responses\SftpAttrsResponse.cs
-
-
- Sftp\Responses\SftpDataResponse.cs
-
-
- Sftp\Responses\SftpExtendedReplyResponse.cs
-
-
- Sftp\Responses\SftpHandleResponse.cs
-
-
- Sftp\Responses\SftpNameResponse.cs
-
-
- Sftp\Responses\SftpResponse.cs
-
-
- Sftp\Responses\SftpStatusResponse.cs
-
-
- Sftp\Responses\SftpVersionResponse.cs
-
-
- Sftp\SftpCloseAsyncResult.cs
-
-
- Sftp\SftpDownloadAsyncResult.cs
-
-
- Sftp\SftpFile.cs
-
-
- Sftp\SftpFileAttributes.cs
-
-
- Sftp\SftpFileReader.cs
-
-
- Sftp\SftpFileStream.cs
-
-
- Sftp\SftpFileSystemInformation.cs
-
-
- Sftp\SftpListDirectoryAsyncResult.cs
-
-
- Sftp\SftpMessage.cs
-
-
- Sftp\SftpMessageTypes.cs
-
-
- Sftp\SftpOpenAsyncResult.cs
-
-
- Sftp\SftpReadAsyncResult.cs
-
-
- Sftp\SftpRealPathAsyncResult.cs
-
-
- Sftp\SftpResponseFactory.cs
-
-
- Sftp\SftpSession.cs
-
-
- Sftp\SFtpStatAsyncResult.cs
-
-
- Sftp\SftpSynchronizeDirectoriesAsyncResult.cs
-
-
- Sftp\SftpUploadAsyncResult.cs
-
-
- Sftp\StatusCodes.cs
-
-
- Shell.cs
-
-
- ShellStream.cs
-
-
- SshClient.cs
-
-
- SshCommand.cs
-
-
- SshMessageFactory.cs
-
-
- SubsystemSession.cs
-
-
-
-
- Properties\CommonAssemblyInfo.cs
-
-
-
-
-
- Renci.SshNet.snk
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Renci.SshNet.NETCore/Properties/AssemblyInfo.cs b/src/Renci.SshNet.NETCore/Properties/AssemblyInfo.cs
deleted file mode 100644
index d5769ab9..00000000
--- a/src/Renci.SshNet.NETCore/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-using System.Reflection;
-
-[assembly: AssemblyTitle("SSH.NET")]
diff --git a/src/Renci.SshNet.NETCore/Renci.SshNet.NETCore.csproj b/src/Renci.SshNet.NETCore/Renci.SshNet.NETCore.csproj
deleted file mode 100644
index d913f3d2..00000000
--- a/src/Renci.SshNet.NETCore/Renci.SshNet.NETCore.csproj
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
- SSH.NET
- netstandard1.3
- true
- true
- Renci.SshNet
- ../Renci.SshNet.snk
- 5
- true
- true
- false
- false
- false
- false
- false
- false
- false
- false
- false
-
-
-
- %(RecursiveDir)%(Filename)%(Extension)
-
-
-
-
- 1.6.0
-
-
-
-
- 4.0.1
-
-
- [1.2.0]
-
-
- 4.0.11
-
-
- 4.0.1
-
-
- 4.0.0
-
-
- 4.0.11
-
-
- 4.1.0
-
-
- 4.0.1
-
-
- 4.0.1
-
-
- 4.1.0
-
-
- 4.0.0
-
-
- 4.1.0
-
-
- 4.0.1
-
-
- 4.1.0
-
-
- 4.2.0
-
-
- 4.1.0
-
-
- 4.0.11
-
-
- 4.0.0
-
-
- 4.0.10
-
-
- 4.0.1
-
-
- 4.0.1
-
-
- 4.0.1
-
-
-
-
-
-
-
- FEATURE_ENCODING_ASCII;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_MEMORYSTREAM_TRYGETBUFFER;FEATURE_REFLECTION_TYPEINFO;FEATURE_RNG_CREATE;FEATURE_SOCKET_TAP;FEATURE_SOCKET_EAP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_SETSOCKETOPTION;FEATURE_SOCKET_SELECT;FEATURE_SOCKET_POLL;FEATURE_SOCKET_DISPOSE;FEATURE_DNS_TAP;FEATURE_STREAM_TAP;FEATURE_THREAD_COUNTDOWNEVENT;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_HASH_MD5;FEATURE_HASH_SHA1_CREATE;FEATURE_HASH_SHA256_CREATE;FEATURE_HASH_SHA384_CREATE;FEATURE_HASH_SHA512_CREATE;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512
-
-
- portable
-
-
- none
-
-
\ No newline at end of file
diff --git a/src/Renci.SshNet.Silverlight/Common/Extensions.SilverlightShared.cs b/src/Renci.SshNet.Silverlight/Common/Extensions.SilverlightShared.cs
deleted file mode 100644
index c69e7c4f..00000000
--- a/src/Renci.SshNet.Silverlight/Common/Extensions.SilverlightShared.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System;
-using System.Net.Sockets;
-using System.Threading;
-using System.Security.Cryptography;
-using System.Diagnostics;
-
-namespace Renci.SshNet.Common
-{
- ///
- /// Collection of different extension method specific for Silverlight
- ///
- internal static partial class Extensions
- {
- ///
- /// Disposes the specified socket.
- ///
- /// The socket.
- [DebuggerNonUserCode]
- internal static void Dispose(this Socket socket)
- {
- if (socket == null)
- throw new NullReferenceException();
-
- socket.Close();
- }
-
- ///
- /// Disposes the specified handle.
- ///
- /// The handle.
- [DebuggerNonUserCode]
- internal static void Dispose(this WaitHandle handle)
- {
- if (handle == null)
- throw new NullReferenceException();
-
- handle.Close();
- }
-
- ///
- /// Disposes the specified algorithm.
- ///
- /// The algorithm.
- [DebuggerNonUserCode]
- internal static void Dispose(this HashAlgorithm algorithm)
- {
- if (algorithm == null)
- throw new NullReferenceException();
-
- algorithm.Clear();
- }
- }
-}
diff --git a/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj b/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj
index 16c95635..8e579ab1 100644
--- a/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj
+++ b/src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj
@@ -593,12 +593,411 @@
Security\Algorithm.cs
+
+ Security\Cryptography\BouncyCastle\asn1\sec\SECNamedCurves.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9Curve.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9ECParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9ECParametersHolder.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9ECPoint.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\agreement\ECDHCBasicAgreement.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\AsymmetricCipherKeyPair.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\AsymmetricKeyParameter.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\digests\GeneralDigest.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\digests\Sha256Digest.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\generators\ECKeyPairGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\IAsymmetricCipherKeyPairGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\IDigest.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\KeyGenerationParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECDomainParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECKeyGenerationParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECKeyParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECPrivateKeyParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECPublicKeyParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\prng\CryptoApiRandomGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\prng\DigestRandomGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\prng\IRandomGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\util\Pack.cs
+
+
+ Security\Cryptography\BouncyCastle\math\BigInteger.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\abc\SimpleBigDecimal.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\abc\Tnaf.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\abc\ZTauElement.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECAlgorithms.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECCurve.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECFieldElement.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECLookupTable.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECPoint.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECPointMap.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\endo\ECEndomorphism.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\endo\GlvEndomorphism.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\LongArray.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\AbstractECMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\ECMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\FixedPointCombMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\FixedPointPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\FixedPointUtilities.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\GlvMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\IPreCompCallback.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\PreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\ValidityPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WNafL2RMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WNafPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WNafUtilities.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WTauNafMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WTauNafPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\FiniteFields.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\GenericPolynomialExtensionField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\GF2Polynomial.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IExtensionField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IFiniteField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IPolynomial.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IPolynomialExtensionField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\PrimeField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\raw\Mod.cs
+
+
+ Security\Cryptography\BouncyCastle\math\raw\Nat.cs
+
+
+ Security\Cryptography\BouncyCastle\security\DigestUtilities.cs
+
+
+ Security\Cryptography\BouncyCastle\security\SecureRandom.cs
+
+
+ Security\Cryptography\BouncyCastle\security\SecurityUtilityException.cs
+
+
+ Security\Cryptography\BouncyCastle\util\Arrays.cs
+
+
+ Security\Cryptography\BouncyCastle\util\BigIntegers.cs
+
+
+ Security\Cryptography\BouncyCastle\util\encoders\Hex.cs
+
+
+ Security\Cryptography\BouncyCastle\util\encoders\HexEncoder.cs
+
+
+ Security\Cryptography\BouncyCastle\util\IMemoable.cs
+
+
+ Security\Cryptography\BouncyCastle\util\Integers.cs
+
+
+ Security\Cryptography\BouncyCastle\util\MemoableResetException.cs
+
+
+ Security\Cryptography\BouncyCastle\util\Times.cs
+
Security\CertificateHostAlgorithm.cs
+
+ Security\Cryptography\Chaos.NaCl\CryptoBytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Ed25519.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Array16.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Array8.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\ByteIntegerConverter.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\base.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\base2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\d.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\d2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_1.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_add.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_cmov.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_cswap.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_frombytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_invert.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_isnegative.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_isnonzero.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_mul.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_mul121666.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_neg.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_pow22523.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_sq.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_sq2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_sub.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_tobytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\FieldElement.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_add.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_double_scalarmult.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_frombytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_madd.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_msub.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p3.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_dbl.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_dbl.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_tobytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_cached.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_p2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_precomp_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_scalarmult_base.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_sub.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_tobytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\GroupElement.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\keypair.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\open.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\scalarmult.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sc_clamp.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sc_mul_add.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sc_reduce.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sign.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sqrtm1.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\InternalAssert.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Poly1305Donna.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Salsa\Salsa20.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Salsa\SalsaCore.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Sha512Internal.cs
+
+
+ Security\Cryptography\Chaos.NaCl\MontgomeryCurve25519.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Sha512.cs
+
Security\Cryptography\AsymmetricCipher.cs
+
+ Security\Cryptography\Bcrypt.cs
+
Security\Cryptography\BlockCipher.cs
@@ -668,6 +1067,12 @@
Security\Cryptography\DsaKey.cs
+
+ Security\Cryptography\ED25519DigitalSignature.cs
+
+
+ Security\Cryptography\ED25519Key.cs
+
Security\Cryptography\HMACMD5.cs
@@ -731,6 +1136,24 @@
Security\KeyExchangeDiffieHellmanGroupSha1.cs
+
+ Security\KeyExchangeEC.cs
+
+
+ Security\KeyExchangeECCurve25519.cs
+
+
+ Security\KeyExchangeECDH.cs
+
+
+ Security\KeyExchangeECDH256.cs
+
+
+ Security\KeyExchangeECDH384.cs
+
+
+ Security\KeyExchangeECDH521.cs
+
Security\KeyHostAlgorithm.cs
@@ -944,7 +1367,6 @@
SubsystemSession.cs
-
Properties\CommonAssemblyInfo.cs
diff --git a/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj b/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj
index 910eb770..30e4f2b8 100644
--- a/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj
+++ b/src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj
@@ -29,7 +29,7 @@
full
false
Bin\Debug
- TRACE;DEBUG;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_SOCKET_SETSOCKETOPTION;FEATURE_SOCKET_DISPOSE;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1_MANAGED;FEATURE_HASH_SHA256_MANAGED;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256
+ TRACE;DEBUG;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_SOCKET_DISPOSE;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1_MANAGED;FEATURE_HASH_SHA256_MANAGED;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256
true
true
prompt
@@ -42,7 +42,7 @@
none
true
Bin\Release
- TRACE;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_SOCKET_SETSOCKETOPTION;FEATURE_SOCKET_DISPOSE;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1_MANAGED;FEATURE_HASH_SHA256_MANAGED;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256
+ TRACE;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_SOCKET_DISPOSE;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1_MANAGED;FEATURE_HASH_SHA256_MANAGED;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256
true
true
prompt
@@ -200,9 +200,6 @@
Common\Extensions.cs
-
- Common\Extensions.SilverlightShared.cs
-
Common\HostKeyEventArgs.cs
@@ -602,12 +599,411 @@
Security\Algorithm.cs
+
+ Security\Cryptography\BouncyCastle\asn1\sec\SECNamedCurves.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9Curve.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9ECParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9ECParametersHolder.cs
+
+
+ Security\Cryptography\BouncyCastle\asn1\x9\X9ECPoint.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\agreement\ECDHCBasicAgreement.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\AsymmetricCipherKeyPair.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\AsymmetricKeyParameter.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\digests\GeneralDigest.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\digests\Sha256Digest.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\generators\ECKeyPairGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\IAsymmetricCipherKeyPairGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\IDigest.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\KeyGenerationParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECDomainParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECKeyGenerationParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECKeyParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECPrivateKeyParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\parameters\ECPublicKeyParameters.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\prng\CryptoApiRandomGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\prng\DigestRandomGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\prng\IRandomGenerator.cs
+
+
+ Security\Cryptography\BouncyCastle\crypto\util\Pack.cs
+
+
+ Security\Cryptography\BouncyCastle\math\BigInteger.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\abc\SimpleBigDecimal.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\abc\Tnaf.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\abc\ZTauElement.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECAlgorithms.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECCurve.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECFieldElement.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECLookupTable.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECPoint.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\ECPointMap.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\endo\ECEndomorphism.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\endo\GlvEndomorphism.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\LongArray.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\AbstractECMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\ECMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\FixedPointCombMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\FixedPointPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\FixedPointUtilities.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\GlvMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\IPreCompCallback.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\PreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\ValidityPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WNafL2RMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WNafPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WNafUtilities.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WTauNafMultiplier.cs
+
+
+ Security\Cryptography\BouncyCastle\math\ec\multiplier\WTauNafPreCompInfo.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\FiniteFields.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\GenericPolynomialExtensionField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\GF2Polynomial.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IExtensionField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IFiniteField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IPolynomial.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\IPolynomialExtensionField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\field\PrimeField.cs
+
+
+ Security\Cryptography\BouncyCastle\math\raw\Mod.cs
+
+
+ Security\Cryptography\BouncyCastle\math\raw\Nat.cs
+
+
+ Security\Cryptography\BouncyCastle\security\DigestUtilities.cs
+
+
+ Security\Cryptography\BouncyCastle\security\SecureRandom.cs
+
+
+ Security\Cryptography\BouncyCastle\security\SecurityUtilityException.cs
+
+
+ Security\Cryptography\BouncyCastle\util\Arrays.cs
+
+
+ Security\Cryptography\BouncyCastle\util\BigIntegers.cs
+
+
+ Security\Cryptography\BouncyCastle\util\encoders\Hex.cs
+
+
+ Security\Cryptography\BouncyCastle\util\encoders\HexEncoder.cs
+
+
+ Security\Cryptography\BouncyCastle\util\IMemoable.cs
+
+
+ Security\Cryptography\BouncyCastle\util\Integers.cs
+
+
+ Security\Cryptography\BouncyCastle\util\MemoableResetException.cs
+
+
+ Security\Cryptography\BouncyCastle\util\Times.cs
+
Security\CertificateHostAlgorithm.cs
+
+ Security\Cryptography\Chaos.NaCl\CryptoBytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Ed25519.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Array16.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Array8.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\ByteIntegerConverter.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\base.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\base2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\d.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\d2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_1.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_add.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_cmov.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_cswap.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_frombytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_invert.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_isnegative.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_isnonzero.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_mul.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_mul121666.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_neg.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_pow22523.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_sq.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_sq2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_sub.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\fe_tobytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\FieldElement.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_add.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_double_scalarmult.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_frombytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_madd.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_msub.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p1p1_to_p3.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p2_dbl.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_dbl.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_tobytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_cached.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_p3_to_p2.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_precomp_0.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_scalarmult_base.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_sub.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\ge_tobytes.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\GroupElement.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\keypair.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\open.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\scalarmult.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sc_clamp.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sc_mul_add.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sc_reduce.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sign.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Ed25519Ref10\sqrtm1.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\InternalAssert.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Poly1305Donna.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Salsa\Salsa20.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Salsa\SalsaCore.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Internal\Sha512Internal.cs
+
+
+ Security\Cryptography\Chaos.NaCl\MontgomeryCurve25519.cs
+
+
+ Security\Cryptography\Chaos.NaCl\Sha512.cs
+
Security\Cryptography\AsymmetricCipher.cs
+
+ Security\Cryptography\Bcrypt.cs
+
Security\Cryptography\BlockCipher.cs
@@ -677,6 +1073,12 @@
Security\Cryptography\DsaKey.cs
+
+ Security\Cryptography\ED25519DigitalSignature.cs
+
+
+ Security\Cryptography\ED25519Key.cs
+
Security\Cryptography\HMACMD5.cs
@@ -740,6 +1142,24 @@
Security\KeyExchangeDiffieHellmanGroupSha1.cs
+
+ Security\KeyExchangeEC.cs
+
+
+ Security\KeyExchangeECCurve25519.cs
+
+
+ Security\KeyExchangeECDH.cs
+
+
+ Security\KeyExchangeECDH256.cs
+
+
+ Security\KeyExchangeECDH384.cs
+
+
+ Security\KeyExchangeECDH521.cs
+
Security\KeyHostAlgorithm.cs
diff --git a/src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortLocal.NET35.cs b/src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortLocal.NET35.cs
deleted file mode 100644
index 2eec0336..00000000
--- a/src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortLocal.NET35.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.SshClientTests
-{
- public partial class ForwardedPortLocalTest : TestBase
- {
- }
-}
diff --git a/src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortRemote.NET35.cs b/src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortRemote.NET35.cs
deleted file mode 100644
index 5b057ba1..00000000
--- a/src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortRemote.NET35.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.SshClientTests
-{
- public partial class ForwardedPortRemoteTest : TestBase
- {
- }
-}
diff --git a/src/Renci.SshNet.Tests.NET35/Classes/SshCommandTest.NET35.cs b/src/Renci.SshNet.Tests.NET35/Classes/SshCommandTest.NET35.cs
deleted file mode 100644
index 8f95bf3f..00000000
--- a/src/Renci.SshNet.Tests.NET35/Classes/SshCommandTest.NET35.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.SshClientTests
-{
- public partial class SshCommandTest : TestBase
- {
- }
-}
diff --git a/src/Renci.SshNet.Tests.NET35/Properties/AssemblyInfo.cs b/src/Renci.SshNet.Tests.NET35/Properties/AssemblyInfo.cs
deleted file mode 100644
index 01506232..00000000
--- a/src/Renci.SshNet.Tests.NET35/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("SSH.NET Tests .NET 3.5")]
-[assembly: Guid("7c827904-40c1-4fe3-8ed1-8a729b8417a9")]
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests.NET35/Properties/Resources.Designer.cs b/src/Renci.SshNet.Tests.NET35/Properties/Resources.Designer.cs
deleted file mode 100644
index 54bef950..00000000
--- a/src/Renci.SshNet.Tests.NET35/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,206 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18010
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Renci.SshNet.Tests.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Renci.SshNet.Tests.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- ///
- /// Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
- ///Proc-Type: 4,ENCRYPTED
- ///DEK-Info: DES-EDE3-CBC,053105DCFC6132E7
- ///
- ///nVjIhJr3Eeqk0aBfyYK38B6cF0g35U2acgq5t3zG8fCM5JLSnFcmkkYvohbmCLva
- ///swNHMfmwumoX8Ga94cxGu6vW1qf+IMvgEU4U53DtJqRoeICMwIre1yUq2cCrV+gI
- ///qQ6MAVMDgfMs7HrPs5999m+KoDh7oYsA1l5q+axU/rqM4g3lySr/1oT6oAQx5Qp2
- ///2DYkZEwnX5+NTw6aoMXl2qgIHBVxa7wZRMp9L0yAlEFk8T7fMuPrLSAEUBghcIaP
- ///iBY1OY+M9MgDTTU56ZjLl+DfT3XfKzsZ3fmn1+bLqTRreiuS4/WF6xIa/DQu1sQd
- ///nnjYgnKYcTWSvWWK9AcIVSpoiW2y6FcPkMAIw54ABrzBp4Rz0//Ykwv2Ga7AZxxm
- ///P+lkxKf2RWnh406F [rest of string was truncated]";.
- ///
- internal static string DSA_KEY_WITH_PASS {
- get {
- return ResourceManager.GetString("DSA_KEY_WITH_PASS", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
- ///MIIBvAIBAAKBgQDdQrrwGvknwD+pb9Gpv/vDxj8yqFUg0cUuC/tkjm3u+lQj86Rw
- ///fA8RJOV+OP4Gtvs9zOSsxiuginoB/uEiT+6jbHvyvJeJp2fsDWLx/tVRXxpi8Nwe
- ///bfb455R0wVVZdqnFKsAZLrQAT589EUtLgyVAFQbUP5Fz6px8H8AG0qlybQIVALn7
- ///UOxnbFR7fDfZkq2Pc7ZCVegpAoGBANRKf9vezuz1aGUnUGWILHO09SibHK255fkr
- ///u4//zvCbdawWSZOoU+vMnplLUhNaVMoSyYE/TYOZvvbG9UtPvr8wZGdNPipvIXIB
- ///xlpr+FH0mnSx0qlaRy3PEoDRAmw6msRCzVYV3vZ8ZTEUdt+phuru+pn0W9EugzCM
- ///HikVVhJMAoGASHB5nNlWhpqvungn+otYyGKoVoATkRdRfSiUo3fb0mJLTmxrEhEH
- ///4UOFA/UFdQ0TYXXW0 [rest of string was truncated]";.
- ///
- internal static string DSA_KEY_WITHOUT_PASS {
- get {
- return ResourceManager.GetString("DSA_KEY_WITHOUT_PASS", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to oleg-centos.edc.renci.org.
- ///
- internal static string HOST {
- get {
- return ResourceManager.GetString("HOST", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
- ///MIIBugIBAAKBgQCG3ij/JvdNp+1VUsK2zmLM5QWNN4MRRm/FCOHDknDJrWdSKheO
- ///h6BbCgyFOw+k5qYtwXQnt3DpQfxPi7PIjr3tQJ9gB8LzqH2DwT2hMXm9VV2ImX2P
- ///12aj8hZVM99WOp/ma6+ivLSFHnwET19eaqS9SRb0ftIqZXpWGE3ddW07qQIVAOfT
- ///1OPSsvAnOsSrYc5HG5K3xIWlAoGAAzhTmi29+v0YTIsW2W1FihsexeAnpPPjYgRO
- ///eT6HreyTvh20UASxDP+IJ2Ba+41G6MU0isuAijp8Z4CCC4RpoS46Ksc3JtPsZiRy
- ///wAjwlb7JKGRBoY8V3aT47Xyx+iTSclZfzTmv0Z0bb56NZ6KEU8WRnks2d7tsb0fq
- ///JTAgLkkCgYBvt5EoxhlCwEUgm8j3nD4TLSRYt1lt6LVulBYA9qlV4F68b2cJUuOi
- ///YTV9H2SWRF6UF+GiR [rest of string was truncated]";.
- ///
- internal static string INVALID_KEY {
- get {
- return ResourceManager.GetString("INVALID_KEY", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to tester.
- ///
- internal static string PASSWORD {
- get {
- return ResourceManager.GetString("PASSWORD", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 22.
- ///
- internal static string PORT {
- get {
- return ResourceManager.GetString("PORT", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to proxy.oleg-centos.edc.renci.org.
- ///
- internal static string PROXY_HOST {
- get {
- return ResourceManager.GetString("PROXY_HOST", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 8123.
- ///
- internal static string PROXY_PORT {
- get {
- return ResourceManager.GetString("PROXY_PORT", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to -----BEGIN RSA PRIVATE KEY-----
- ///Proc-Type: 4,ENCRYPTED
- ///DEK-Info: DES-EDE3-CBC,B3475536EDD1B442
- ///
- ///Xa6Y7FYTfz19CMzPcVbCpBHEh8x3tnA9PutKEDNMwKbR+NVUvBx5fN1QjrLpltCr
- ///uX7yD3vLCeyihg4oaK3nTBZBcsB/1TZx+MlLgpvMfV1JKmbKCmebBZ3lUpsypHlG
- ///FpCY41miFwdHmBe6tuwL9XA3vz26eJwSgJGMkVN9EBvNbiOHinEPhSW0whzBfbv+
- ///OfseG73gvHc4jZS6Sw8h5VDBAmlldJEfkP/s/1/iTbCXFQ22xRb4Z6NilEyKiWpB
- ///nQviXmaucTWCEuNF5QDA7oV7Ugwm5cAXuBqFIs9ZGaKV4/XpfX1tClOLfB3Lguh+
- ///bbkwjPb0ztlhKa4gkwXiMs0S/lhoueXBae4QStM0qJBXHtFhhRYIn4JeIZ8CJ0k6
- ///SMP7QVfPf5aJIaa8 [rest of string was truncated]";.
- ///
- internal static string RSA_KEY_WITH_PASS {
- get {
- return ResourceManager.GetString("RSA_KEY_WITH_PASS", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to -----BEGIN RSA PRIVATE KEY-----
- ///MIIEogIBAAKCAQEA8ZsD8jgH7ySXnd4dprEFFkJ+zs1ne81E8febjR8hekiKrc+D
- ///9GjeEykchy0PsrsBrf2F8J3GtLNISVerkl+EnVh1E0pi9Vllc1vcpQHvBeNPG/jl
- ///9Dnum/DcaaMKLot+ARXjBuMX/xJVfnlgkvfpBvoq4QzQ6E27rOMbcPlvrN7KeYba
- ///orsTpDMUraHX5u99P1evvw7sOuNl3lc9YpIgmjHT6dWUGTqBx9T2SEKXBRVk2NNb
- ///d2UctQkr5BJn1gGehA+1KYS30FMiCSN8F8ZOlpYj1+K6xzs0srq1z30LailIyy7Q
- ///mYp739BJlOF3cVywdcFXGre35H2cJylcNV2e+QIBIwKCAQAbnK/+bM207j02nQqz
- ///9vlEX17zECkVdouJXiBn5kz4CEpdAcXwC/wfcmmpDHbSmQeBmVEi0DP3ZPJRhlzA
- ///RW493jlECIBWjd+1a [rest of string was truncated]";.
- ///
- internal static string RSA_KEY_WITHOUT_PASS {
- get {
- return ResourceManager.GetString("RSA_KEY_WITHOUT_PASS", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to tester.
- ///
- internal static string USERNAME {
- get {
- return ResourceManager.GetString("USERNAME", resourceCulture);
- }
- }
- }
-}
diff --git a/src/Renci.SshNet.Tests.NET35/Properties/Resources.resx b/src/Renci.SshNet.Tests.NET35/Properties/Resources.resx
deleted file mode 100644
index b1605aba..00000000
--- a/src/Renci.SshNet.Tests.NET35/Properties/Resources.resx
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- -----BEGIN DSA PRIVATE KEY-----
-MIIBvAIBAAKBgQDdQrrwGvknwD+pb9Gpv/vDxj8yqFUg0cUuC/tkjm3u+lQj86Rw
-fA8RJOV+OP4Gtvs9zOSsxiuginoB/uEiT+6jbHvyvJeJp2fsDWLx/tVRXxpi8Nwe
-bfb455R0wVVZdqnFKsAZLrQAT589EUtLgyVAFQbUP5Fz6px8H8AG0qlybQIVALn7
-UOxnbFR7fDfZkq2Pc7ZCVegpAoGBANRKf9vezuz1aGUnUGWILHO09SibHK255fkr
-u4//zvCbdawWSZOoU+vMnplLUhNaVMoSyYE/TYOZvvbG9UtPvr8wZGdNPipvIXIB
-xlpr+FH0mnSx0qlaRy3PEoDRAmw6msRCzVYV3vZ8ZTEUdt+phuru+pn0W9EugzCM
-HikVVhJMAoGASHB5nNlWhpqvungn+otYyGKoVoATkRdRfSiUo3fb0mJLTmxrEhEH
-4UOFA/UFdQ0TYXXW0wRX/amynT4iTEXAx0FjxUNK5ryxloeoXiXEH4FK7D8RtJO1
-1UsaRrN+nqWiSTVAehl6tzoMCPargGcWeFlAZZnPGN76OD9J1GiKZj8CFQCl8SkF
-GWfS+mH8xhLsxh1nI7rfJw==
------END DSA PRIVATE KEY-----
-
-
- -----BEGIN DSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,053105DCFC6132E7
-
-nVjIhJr3Eeqk0aBfyYK38B6cF0g35U2acgq5t3zG8fCM5JLSnFcmkkYvohbmCLva
-swNHMfmwumoX8Ga94cxGu6vW1qf+IMvgEU4U53DtJqRoeICMwIre1yUq2cCrV+gI
-qQ6MAVMDgfMs7HrPs5999m+KoDh7oYsA1l5q+axU/rqM4g3lySr/1oT6oAQx5Qp2
-2DYkZEwnX5+NTw6aoMXl2qgIHBVxa7wZRMp9L0yAlEFk8T7fMuPrLSAEUBghcIaP
-iBY1OY+M9MgDTTU56ZjLl+DfT3XfKzsZ3fmn1+bLqTRreiuS4/WF6xIa/DQu1sQd
-nnjYgnKYcTWSvWWK9AcIVSpoiW2y6FcPkMAIw54ABrzBp4Rz0//Ykwv2Ga7AZxxm
-P+lkxKf2RWnh406FxBvBZzwB3rQeeM7QTg2IcFqGnlf005FIikp6SlyhZ/3M/Nl3
-FW235vuO37jLCL8qosGt4NOWAstXaxDujfIb/Q+IYxUpWZrdiH5tM/mUXARK0Sjf
-D8DHbFwAT2mUv1QxRXYJO1y4pENboEzT6LUqxJgE+ae/F/29g2RD9DhtwqKqWjhM
-7jB0kNVZrz3qUKnoJHIozA==
------END DSA PRIVATE KEY-----
-
-
- oleg-centos.edc.renci.org
-
-
- -----BEGIN DSA PRIVATE KEY-----
-MIIBugIBAAKBgQCG3ij/JvdNp+1VUsK2zmLM5QWNN4MRRm/FCOHDknDJrWdSKheO
-h6BbCgyFOw+k5qYtwXQnt3DpQfxPi7PIjr3tQJ9gB8LzqH2DwT2hMXm9VV2ImX2P
-12aj8hZVM99WOp/ma6+ivLSFHnwET19eaqS9SRb0ftIqZXpWGE3ddW07qQIVAOfT
-1OPSsvAnOsSrYc5HG5K3xIWlAoGAAzhTmi29+v0YTIsW2W1FihsexeAnpPPjYgRO
-eT6HreyTvh20UASxDP+IJ2Ba+41G6MU0isuAijp8Z4CCC4RpoS46Ksc3JtPsZiRy
-wAjwlb7JKGRBoY8V3aT47Xyx+iTSclZfzTmv0Z0bb56NZ6KEU8WRnks2d7tsb0fq
-JTAgLkkCgYBvt5EoxhlCwEUgm8j3nD4TLSRYt1lt6LVulBYA9qlV4F68b2cJUuOi
-YTV9H2SWRF6UF+GiR5SajChveS106T9O+tepip+7V5YgFfW+ALOxwar+6V8VoUF4
-xNvNTWtaw+wK8xsgxhhYDaWVhVLVhR40QmeQhx/BQm+EYkSSa9kkCQIURGd0R+Zj
-tM7dZpB+reWl9L5e2L8=
------END DSA PRIVATE KEY-----
-
-
- tester
-
-
- 22
-
-
- proxy.oleg-centos.edc.renci.org
-
-
- 8123
-
-
- -----BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA8ZsD8jgH7ySXnd4dprEFFkJ+zs1ne81E8febjR8hekiKrc+D
-9GjeEykchy0PsrsBrf2F8J3GtLNISVerkl+EnVh1E0pi9Vllc1vcpQHvBeNPG/jl
-9Dnum/DcaaMKLot+ARXjBuMX/xJVfnlgkvfpBvoq4QzQ6E27rOMbcPlvrN7KeYba
-orsTpDMUraHX5u99P1evvw7sOuNl3lc9YpIgmjHT6dWUGTqBx9T2SEKXBRVk2NNb
-d2UctQkr5BJn1gGehA+1KYS30FMiCSN8F8ZOlpYj1+K6xzs0srq1z30LailIyy7Q
-mYp739BJlOF3cVywdcFXGre35H2cJylcNV2e+QIBIwKCAQAbnK/+bM207j02nQqz
-9vlEX17zECkVdouJXiBn5kz4CEpdAcXwC/wfcmmpDHbSmQeBmVEi0DP3ZPJRhlzA
-RW493jlECIBWjd+1aZWPM2vGKJtTp2q802u6DOX9cbgFUcVB899ugFqDjREVxLqU
-dBqhtjDJQ0sTPBVy2CBkrsrvLy7AZd4LlaqxpdTdpkD/auUxg4zdThHT/XeQ0V0G
-3BS5vGehfqgkDOQpQSm7HexM+9GDJnnzMdNXjmWBPxZU49QAlxujZeZ1M2IgKwMq
-eNkWAOnZJidfsfwYluSCi8OHPN2i1s/b7pgn6ffb50S/k2mmhTHxNChDdGTlW91G
-6CFLAoGBAPlGA4qzZCG4SLBQicGhhXZlwaKKfTvWNi4xNPZeoJezC0G+yZZT7IIV
-zCj83t3dteaRRw15e+7NuIXZx3zl2hANfEpBZwnS4sOekvbS9/S7cEVzOEk53jRU
-TOtHRsvNxS2xK3RywqoaqzcPaK2Df917yzbqvEajMRudRPrsTvYdAoGBAPggB/kJ
-+VxZf13JqV2KgrFoVvykJpRlw2F5+lkH69ON9gdl976J3TNJDqAmHeWFxBUL+6Lt
-9TSpMq3fYueJXg9xaTkSYg177sPRGCmRLO5aneA4nJkIB6KHRXsR71C9D4fJK8Fi
-YB5n5dnBUTBhkvaI6KsxcxDzEg2zAJEcn4WNAoGBAOsHf66pI+VHWnpakINdxvqa
-dL3TCFz9K8UnFK3G7y/x9Kuz4qOuNsPLaLjua7s+wXL+ASn2MwW6pqoWekKPkxZz
-HWqVb8dvEFIKipDyzIepadsU3UxbIfbTI/PG3FnCAw3S7nUbvtrl8eN07arpsxKn
-63zr81iLPO4mkX7ezhs/AoGADi23UA8y0hO+Ip3PKeqoYei0g3cYJbysFDLbGwfE
-VTtP4ypl7aF6WrO3sWFDiXVbqW5mJpFBNjWN3gzD0rdkdek5NnYUO0jpEoD6EQD7
-QNH6ZJWFSpK+m5Kzg2AcTcGpHbO5W4H23SqCKbNGd8sPtlD3Wj1XCEhnbn9B3GgJ
-HZMCgYEAjn9BH4fcobMaM15AV0s6sCEyr/vzn3QBfoIBqqqlipMqOtPDv8oyvGO4
-5tSpMrTKf4e3YAMPA4TXRAiVLjeRYlhdj3He0LkAuZZabrHeRmWqjDruMWd1TcKZ
-3o8DLgYbSH7eGXUJ+euM4spKr5OLkBEkmH7Of6Qxss2njvjVNTE=
------END RSA PRIVATE KEY-----
-
-
- -----BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,B3475536EDD1B442
-
-Xa6Y7FYTfz19CMzPcVbCpBHEh8x3tnA9PutKEDNMwKbR+NVUvBx5fN1QjrLpltCr
-uX7yD3vLCeyihg4oaK3nTBZBcsB/1TZx+MlLgpvMfV1JKmbKCmebBZ3lUpsypHlG
-FpCY41miFwdHmBe6tuwL9XA3vz26eJwSgJGMkVN9EBvNbiOHinEPhSW0whzBfbv+
-OfseG73gvHc4jZS6Sw8h5VDBAmlldJEfkP/s/1/iTbCXFQ22xRb4Z6NilEyKiWpB
-nQviXmaucTWCEuNF5QDA7oV7Ugwm5cAXuBqFIs9ZGaKV4/XpfX1tClOLfB3Lguh+
-bbkwjPb0ztlhKa4gkwXiMs0S/lhoueXBae4QStM0qJBXHtFhhRYIn4JeIZ8CJ0k6
-SMP7QVfPf5aJIaa8t+SlpvtIFTIkEhTViOCl+udT04670DGwmJUgrJAV0r+/Ytf7
-Mi+m3DagN7gGmCvYo+7r7EBl1G6e3hCSYm0rFxGOBesmCWriRoeRpxirWnkrns57
-D57pEC1hg90IdycCGpiwqubGDKFljuMLiVd2w0onVhudShPszP+nJAaq18wUB+rE
-mtBv+GlpqCITREB4lG2noP4r9P9lgrOTqmKvWjvUTQjfS3u0XO/1aQllKlwe97C7
-mfOxcZQWy5F7+9CiWpDpomW7Eso89ja6uyupw4Q4gsm7EUacqOOaVxHrm3MVhYjE
-Bfk9I5agKFqeHdjBUUP0DQ6X7JUEtb/Ri8ZrFnyT8sBG7JYnMTXfjPQqdR493cp2
-hWI5reZLi4CCUqt4Pcmhm2vtwJz5HXChARPYq2C3DhdJHcdhxUr97rfTGE1w8mPY
-JcwSFnNN47UBcDg6nvSfY3SJKV0gmmqz9fEw1pBoCrudJKw9U0vQrNoCEJOpEETG
-4XojbAMsTr0Ps5fI2X1VbVYWtU1uyZxqF8KaTCTN1Paapmqaq4N+qIFrrXA+PTH+
-dyaMLmYJ263Gy5eNkCZMeWLDFZ9WHX/Zx2ERMXfI6fyGImXkb6E0Dia+bB087BZP
-9C5gHAvZIjv+FosZrViFqDfrV5hDXL6bO3+V3zieemRxRCTvMtk+RXUJDd50qIOW
-gKNcSbevLPOyQH7eQbR+fU4KtJDUigbTFunSn2MZkDl2GDDlKI35wUAVr5yGsJbE
-yiIQe5DgLGZcMiEpqbhuqSfuOw0cUlFVyKeNZ/Hr701HWngLt677IY8ExyuNbBfT
-PRaes+hcjJ1QmJoRHZx9rQ3w0IpezCpRkRLRKJzzuQZOuwd95whKFXroFsdeaHxO
-hS4PqlLbuSMLiSIaPSZM6Huc4kb5lqCaxg/SBlXTCX17Z/8TFoqV/wCJz17XnkH6
-9WtKAC2TwKxiLZ2Qzwr2XV48lASugIOZkSW2qxM9ui+b1T9ICFKRGLn/UB//pOiG
-270hNJDLB/BKRExjS+RXeOpdAIJB5XsAEp8h56ub9emhhf9tCEXOn7PN7HbMCnQh
-7k8EpAG0h5StLUhY1HHvynVz2/qyMvZa/bIaaudL2565Z6nDU+iBxed7O1qrbRAH
-Vakr7Sa3K5niCyH5kxdyO1t29l1ksBqpDUrj+vViFuLkd3XIiui8IA==
------END RSA PRIVATE KEY-----
-
-
- tester
-
-
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj b/src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj
deleted file mode 100644
index 33c9b1c2..00000000
--- a/src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj
+++ /dev/null
@@ -1,1705 +0,0 @@
-
-
-
- Debug
- AnyCPU
-
-
- 2.0
- {007CE8B3-7827-4AD0-AACD-860505638ABE}
- Library
- Properties
- Renci.SshNet.Tests
- Renci.SshNet.Tests.NET35
- v3.5
- 512
- {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
-
-
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG
- prompt
- 4
- 5
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 0
-
-
- true
-
-
- ..\Renci.SshNet.snk
-
-
-
-
- ..\..\packages\Moq.4.2.1409.1722\lib\net35\Moq.dll
-
-
-
- 3.5
-
-
-
-
-
-
- False
-
-
-
-
- Classes\Abstraction\CryptoAbstraction_GenerateRandom.cs
-
-
- Classes\Abstraction\DnsAbstraction_GetHostAddresses.cs
-
-
- Classes\Abstraction\ThreadAbstraction_ExecuteThread.cs
-
-
- Classes\ForwardedPortStatusTest_Started.cs
-
-
- Classes\ForwardedPortStatusTest_Starting.cs
-
-
- Classes\ForwardedPortStatusTest_Stopped.cs
-
-
- Classes\ForwardedPortStatusTest_Stopping.cs
-
-
- Classes\BaseClientTest_Connected_KeepAlivesNotSentConcurrently.cs
-
-
- Classes\Channels\ChannelDirectTcpipTest.cs
-
-
- Classes\Channels\ChannelDirectTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
-
-
- Classes\Channels\ChannelForwardedTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
-
-
- Classes\Channels\ChannelSessionTest_Disposed_Closed.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_Disposed.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived.cs
-
-
- Classes\Channels\ChannelSessionTest_Dispose_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs
-
-
- Classes\Channels\ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen.cs
-
-
- Classes\Channels\ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation.cs
-
-
- Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable.cs
-
-
- Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs
-
-
- Classes\Channels\ChannelStub.cs
-
-
- Classes\Channels\ChannelTest_Dispose_SessionIsConnectedAndChannelIsNotOpen.cs
-
-
- Classes\Channels\ChannelTest_Dispose_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs
-
-
- Classes\Channels\ChannelTest_Dispose_SessionIsConnectedAndChannelIsOpen_EofNotReceived_SendEofInvoked.cs
-
-
- Classes\Channels\ChannelTest_Dispose_SessionIsConnectedAndChannelIsOpen_EofReceived.cs
-
-
- Classes\Channels\ChannelTest_Dispose_SessionIsNotConnectedAndChannelIsNotOpen.cs
-
-
- Classes\Channels\ChannelTest_Dispose_SessionIsNotConnectedAndChannelIsOpen.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs
-
-
- Classes\Channels\ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen.cs
-
-
- Classes\Channels\ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs
-
-
- Classes\Channels\ClientChannelStub.cs
-
-
- Classes\Channels\ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs
-
-
- Classes\Channels\ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs
-
-
- Classes\CipherInfoTest.cs
-
-
- Classes\ClientAuthenticationTest.cs
-
-
- Classes\ClientAuthenticationTestBase.cs
-
-
- Classes\ClientAuthenticationTest_Failure_MultiList_AllAllowedAuthenticationsHaveReachedPartialSuccessLimit.cs
-
-
- Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed.cs
-
-
- Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotConfigured.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_PartialSuccessLimitReachedFollowedByFailureInAlternateBranch.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_PartialSuccessLimitReachedFollowedByFailureInAlternateBranch2.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_PartialSuccessLimitReachedFollowedByFailureInSameBranch.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_PartialSuccessLimitReachedFollowedBySuccessInAlternateBranch.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_PartialSuccessLimitReachedFollowedBySuccessInSameBranch.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess.cs
-
-
- Classes\ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod.cs
-
-
- Classes\ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess.cs
-
-
- Classes\ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess_PartialSuccessLimitReached.cs
-
-
- Classes\CommandAsyncResultTest.cs
-
-
- Classes\Common\ASCIIEncodingTest.cs
-
-
- Classes\Common\AsyncResultTest.cs
-
-
- Classes\Common\AuthenticationBannerEventArgsTest.cs
-
-
- Classes\Common\AuthenticationPasswordChangeEventArgsTest.cs
-
-
- Classes\Common\AuthenticationPromptEventArgsTest.cs
-
-
- Classes\Common\AuthenticationPromptTest.cs
-
-
- Classes\Common\BigIntegerTest.cs
-
-
- Classes\Common\ChannelDataEventArgsTest.cs
-
-
- Classes\Common\ChannelEventArgsTest.cs
-
-
- Classes\Common\ChannelOpenFailedEventArgsTest.cs
-
-
- Classes\Common\ChannelRequestEventArgsTest.cs
-
-
- Classes\Common\CountdownEventTest.cs
-
-
- Classes\Common\CountdownEventTest_Dispose_NotSet.cs
-
-
- Classes\Common\CountdownEventTest_Dispose_Set.cs
-
-
- Classes\Common\DerDataTest.cs
-
-
- Classes\Common\ExceptionEventArgsTest.cs
-
-
- Classes\Common\ExtensionsTest_Concat.cs
-
-
- Classes\Common\ExtensionsTest_IsEqualTo_ByteArray.cs
-
-
- Classes\Common\ExtensionsTest_Reverse.cs
-
-
- Classes\Common\ExtensionsTest_Take_Count.cs
-
-
- Classes\Common\ExtensionsTest_Take_OffsetAndCount.cs
-
-
- Classes\Common\ExtensionsTest_TrimLeadingZeros.cs
-
-
- Classes\Common\HostKeyEventArgsTest.cs
-
-
- Classes\Common\NetConfServerExceptionTest.cs
-
-
- Classes\Common\ObjectIdentifierTest.cs
-
-
- Classes\Common\PipeStreamTest.cs
-
-
- Classes\Common\PipeStream_Close_BlockingRead.cs
-
-
- Classes\Common\PipeStream_Close_BlockingWrite.cs
-
-
- Classes\Common\PipeStream_Flush_BytesRemainingAfterRead.cs
-
-
- Classes\Common\PipeStream_Flush_NoBytesRemainingAfterRead.cs
-
-
- Classes\Common\PortForwardEventArgsTest.cs
-
-
- Classes\Common\PosixPathTest_GetFileName.cs
-
-
- Classes\Common\ProxyExceptionTest.cs
-
-
- Classes\Common\ScpDownloadEventArgsTest.cs
-
-
- Classes\Common\ScpExceptionTest.cs
-
-
- Classes\Common\ScpUploadEventArgsTest.cs
-
-
- Classes\Common\SemaphoreLightTest.cs
-
-
- Classes\Common\SftpPathNotFoundExceptionTest.cs
-
-
- Classes\Common\SftpPermissionDeniedExceptionTest.cs
-
-
- Classes\Common\ShellDataEventArgsTest.cs
-
-
- Classes\Common\SshAuthenticationExceptionTest.cs
-
-
- Classes\Common\SshConnectionExceptionTest.cs
-
-
- Classes\Common\SshDataTest.cs
-
-
- Classes\Common\SshExceptionTest.cs
-
-
- Classes\Common\SshOperationTimeoutExceptionTest.cs
-
-
- Classes\Common\SshPassPhraseNullOrEmptyExceptionTest.cs
-
-
- Classes\Compression\CompressorTest.cs
-
-
- Classes\Compression\ZlibOpenSshTest.cs
-
-
- Classes\Compression\ZlibStreamTest.cs
-
-
- Classes\Compression\ZlibTest.cs
-
-
- Classes\ConnectionInfoTest.cs
-
-
- Classes\ExpectActionTest.cs
-
-
- Classes\ForwardedPortDynamicTest.cs
-
-
- Classes\ForwardedPortDynamicTest_Dispose_PortDisposed.cs
-
-
- Classes\ForwardedPortDynamicTest_Dispose_PortNeverStarted.cs
-
-
- Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelBound.cs
-
-
- Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelNotBound.cs
-
-
- Classes\ForwardedPortDynamicTest_Dispose_PortStopped.cs
-
-
- Classes\ForwardedPortDynamicTest_Started_SocketSendShutdownImmediately.cs
-
-
- Classes\ForwardedPortDynamicTest_Started_SocketVersionNotSupported.cs
-
-
- Classes\ForwardedPortDynamicTest_Start_PortDisposed.cs
-
-
- Classes\ForwardedPortDynamicTest_Start_PortNeverStarted.cs
-
-
- Classes\ForwardedPortDynamicTest_Start_PortStarted.cs
-
-
- Classes\ForwardedPortDynamicTest_Start_PortStopped.cs
-
-
- Classes\ForwardedPortDynamicTest_Start_SessionNotConnected.cs
-
-
- Classes\ForwardedPortDynamicTest_Start_SessionNull.cs
-
-
- Classes\ForwardedPortDynamicTest_Stop_PortDisposed.cs
-
-
- Classes\ForwardedPortDynamicTest_Stop_PortNeverStarted.cs
-
-
- Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelBound.cs
-
-
- Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelNotBound.cs
-
-
- Classes\ForwardedPortDynamicTest_Stop_PortStopped.cs
-
-
- Classes\ForwardedPortLocalTest.cs
-
-
- Classes\ForwardedPortLocalTest_Dispose_PortDisposed.cs
-
-
- Classes\ForwardedPortLocalTest_Dispose_PortDisposed_NeverStarted.cs
-
-
- Classes\ForwardedPortLocalTest_Dispose_PortNeverStarted.cs
-
-
- Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelBound.cs
-
-
- Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelNotBound.cs
-
-
- Classes\ForwardedPortLocalTest_Dispose_PortStopped.cs
-
-
- Classes\ForwardedPortLocalTest_Start_PortDisposed.cs
-
-
- Classes\ForwardedPortLocalTest_Start_PortNeverStarted.cs
-
-
- Classes\ForwardedPortLocalTest_Start_PortStarted.cs
-
-
- Classes\ForwardedPortLocalTest_Start_PortStopped.cs
-
-
- Classes\ForwardedPortLocalTest_Start_SessionNotConnected.cs
-
-
- Classes\ForwardedPortLocalTest_Start_SessionNull.cs
-
-
- Classes\ForwardedPortLocalTest_Stop_PortDisposed.cs
-
-
- Classes\ForwardedPortLocalTest_Stop_PortNeverStarted.cs
-
-
- Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelBound.cs
-
-
- Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelNotBound.cs
-
-
- Classes\ForwardedPortLocalTest_Stop_PortStopped.cs
-
-
- Classes\ForwardedPortRemoteTest.cs
-
-
- Classes\ForwardedPortRemoteTest_Dispose_PortDisposed.cs
-
-
- Classes\ForwardedPortRemoteTest_Dispose_PortNeverStarted.cs
-
-
- Classes\ForwardedPortRemoteTest_Dispose_PortStarted_ChannelBound.cs
-
-
- Classes\ForwardedPortRemoteTest_Dispose_PortStopped.cs
-
-
- Classes\ForwardedPortRemoteTest_Started.cs
-
-
- Classes\ForwardedPortRemoteTest_Start_PortDisposed.cs
-
-
- Classes\ForwardedPortRemoteTest_Start_PortNeverStarted.cs
-
-
- Classes\ForwardedPortRemoteTest_Start_PortStarted.cs
-
-
- Classes\ForwardedPortRemoteTest_Start_PortStopped.cs
-
-
- Classes\ForwardedPortRemoteTest_Start_SessionNotConnected.cs
-
-
- Classes\ForwardedPortRemoteTest_Start_SessionNull.cs
-
-
- Classes\ForwardedPortRemoteTest_Stop_PortDisposed.cs
-
-
- Classes\ForwardedPortRemoteTest_Stop_PortNeverStarted.cs
-
-
- Classes\ForwardedPortRemoteTest_Stop_PortStarted_ChannelBound.cs
-
-
- Classes\ForwardedPortRemoteTest_Stop_PortStopped.cs
-
-
- Classes\KeyboardInteractiveAuthenticationMethodTest.cs
-
-
- Classes\KeyboardInteractiveConnectionInfoTest.cs
-
-
- Classes\MessageEventArgsTest.cs
-
-
- Classes\Messages\Authentication\BannerMessageTest.cs
-
-
- Classes\Messages\Authentication\FailureMessageTest.cs
-
-
- Classes\Messages\Authentication\InformationRequestMessageTest.cs
-
-
- Classes\Messages\Authentication\InformationResponseMessageTest.cs
-
-
- Classes\Messages\Authentication\PasswordChangeRequiredMessageTest.cs
-
-
- Classes\Messages\Authentication\PublicKeyMessageTest.cs
-
-
- Classes\Messages\Authentication\RequestMessageHostTest.cs
-
-
- Classes\Messages\Authentication\RequestMessageKeyboardInteractiveTest.cs
-
-
- Classes\Messages\Authentication\RequestMessageNoneTest.cs
-
-
- Classes\Messages\Authentication\RequestMessagePasswordTest.cs
-
-
- Classes\Messages\Authentication\RequestMessagePublicKeyTest.cs
-
-
- Classes\Messages\Authentication\SuccessMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelCloseMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelDataMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelEofMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelExtendedDataMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelFailureMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelOpenConfirmationMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelOpenFailureMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelOpenInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelOpen\ChannelOpenMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelOpen\DirectTcpipChannelInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelOpen\SessionChannelOpenInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelOpen\X11ChannelOpenInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\BreakRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\ChannelRequestMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\EndOfWriteRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\ExecRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\ExitSignalRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\ExitStatusRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\KeepAliveRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\PseudoTerminalInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\ShellRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\SignalRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\SubsystemRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\WindowChangeRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\X11ForwardingRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelRequest\XonXoffRequestInfoTest.cs
-
-
- Classes\Messages\Connection\ChannelSuccessMessageTest.cs
-
-
- Classes\Messages\Connection\ChannelWindowAdjustMessageTest.cs
-
-
- Classes\Messages\Connection\GlobalRequestMessageTest.cs
-
-
- Classes\Messages\Connection\RequestFailureMessageTest.cs
-
-
- Classes\Messages\Connection\RequestInfoTest.cs
-
-
- Classes\Messages\Connection\RequestSuccessMessageTest.cs
-
-
- Classes\Messages\MessageAttributeTest.cs
-
-
- Classes\Messages\MessageTest.cs
-
-
- Classes\Messages\Transport\DebugMessageTest.cs
-
-
- Classes\Messages\Transport\DisconnectMessageTest.cs
-
-
- Classes\Messages\Transport\IgnoreMessageTest.cs
-
-
- Classes\Messages\Transport\KeyExchangeDhGroupExchangeGroupTest.cs
-
-
- Classes\Messages\Transport\KeyExchangeDhGroupExchangeInitTest.cs
-
-
- Classes\Messages\Transport\KeyExchangeDhGroupExchangeReplyTest.cs
-
-
- Classes\Messages\Transport\KeyExchangeDhGroupExchangeRequestTest.cs
-
-
- Classes\Messages\Transport\KeyExchangeDhInitMessageTest.cs
-
-
- Classes\Messages\Transport\KeyExchangeDhReplyMessageTest.cs
-
-
- Classes\Messages\Transport\KeyExchangeInitMessageTest.cs
-
-
- Classes\Messages\Transport\NewKeysMessageTest.cs
-
-
- Classes\Messages\Transport\ServiceAcceptMessageTest.cs
-
-
- Classes\Messages\Transport\ServiceRequestMessageTest.cs
-
-
- Classes\Messages\Transport\UnimplementedMessageTest.cs
-
-
- Classes\NetConfClientTest.cs
-
-
- Classes\NoneAuthenticationMethodTest.cs
-
-
- Classes\PasswordAuthenticationMethodTest.cs
-
-
- Classes\PasswordConnectionInfoTest.cs
-
-
- Classes\PrivateKeyAuthenticationMethodTest.cs
-
-
- Classes\PrivateKeyConnectionInfoTest.cs
-
-
- Classes\PrivateKeyFileTest.cs
-
-
- Classes\RemotePathDoubleQuoteTransformationTest.cs
-
-
- Classes\RemotePathShellQuoteTransformationTest.cs
-
-
- Classes\ScpClientTest.cs
-
-
- Classes\ScpClientTestBase.cs
-
-
- Classes\ScpClientTest_Download_PathAndDirectoryInfo_SendExecRequestReturnsFalse.cs
-
-
- Classes\ScpClientTest_Download_PathAndFileInfo_SendExecRequestReturnsFalse.cs
-
-
- Classes\ScpClientTest_Download_PathAndStream_SendExecRequestReturnsFalse.cs
-
-
- Classes\ScpClientTest_Upload_DirectoryInfoAndPath_SendExecRequestReturnsFalse.cs
-
-
- Classes\ScpClientTest_Upload_FileInfoAndPath_SendExecRequestReturnsFalse.cs
-
-
- Classes\ScpClientTest_Upload_FileInfoAndPath_Success.cs
-
-
- Classes\ScpClientTest_Upload_StreamAndPath_SendExecRequestReturnsFalse.cs
-
-
- Classes\Security\CertificateHostAlgorithmTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\AesCipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\Arc4CipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\BlowfishCipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\CastCipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\CipherModeTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\CipherPaddingTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\DesCipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\Modes\CbcCipherModeTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\Modes\CfbCipherModeTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\Modes\CtrCipherModeTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\Modes\OfbCipherModeTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\Paddings\PKCS5PaddingTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\Paddings\PKCS7PaddingTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\RsaCipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\SerpentCipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\TripleDesCipherTest.cs
-
-
- Classes\Security\Cryptography\Ciphers\TwofishCipherTest.cs
-
-
- Classes\Security\Cryptography\DsaDigitalSignatureTest.cs
-
-
- Classes\Security\Cryptography\DsaKeyTest.cs
-
-
- Classes\Security\Cryptography\HMacTest.cs
-
-
- Classes\Security\Cryptography\RsaDigitalSignatureTest.cs
-
-
- Classes\Security\Cryptography\RsaKeyTest.cs
-
-
- Classes\Security\KeyExchangeDiffieHellmanGroup14Sha1Test.cs
-
-
- Classes\Security\KeyExchangeDiffieHellmanGroup1Sha1Test.cs
-
-
- Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha1Test.cs
-
-
- Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha256Test.cs
-
-
- Classes\Security\KeyHostAlgorithmTest.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_EndLStatThrowsSshException.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_FileSizeIsAlmostSixTimesGreaterThanChunkSize.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_FileSizeIsEqualToChunkSize.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_FileSizeIsExactlyFiveTimesGreaterThanChunkSize.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_FileSizeIsLessThanChunkSize.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_FileSizeIsLittleMoreThanFiveTimesGreaterThanChunkSize.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_FileSizeIsMoreThanTenTimesGreaterThanChunkSize.cs
-
-
- Classes\ServiceFactoryTest_CreateSftpFileReader_FileSizeIsZero.cs
-
-
- Classes\ServiceFactoryTest_CreateShellStream.cs
-
-
- Classes\SessionTest.cs
-
-
- Classes\SessionTest.HttpProxy.cs
-
-
- Classes\SessionTest_Connected.cs
-
-
- Classes\SessionTest_ConnectedBase.cs
-
-
- Classes\SessionTest_Connected_ConnectionReset.cs
-
-
- Classes\SessionTest_Connected_Disconnect.cs
-
-
- Classes\SessionTest_Connected_GlobalRequestMessageAfterAuthenticationRace.cs
-
-
- Classes\SessionTest_Connected_ServerAndClientDisconnectRace.cs
-
-
- Classes\SessionTest_Connected_ServerSendsBadPacket.cs
-
-
- Classes\SessionTest_Connected_ServerSendsDisconnectMessage.cs
-
-
- Classes\SessionTest_Connected_ServerSendsDisconnectMessageAndShutsDownSocket.cs
-
-
- Classes\SessionTest_Connected_ServerShutsDownSendAfterSendingIncompletePacket.cs
-
-
- Classes\SessionTest_Connected_ServerShutsDownSocket.cs
-
-
- Classes\SessionTest_NotConnected.cs
-
-
- Classes\SessionTest_SocketConnected_BadPacketAndDispose.cs
-
-
- Classes\SftpClientTest.ChangeDirectory.cs
-
-
- Classes\SftpClientTest.Connect.cs
-
-
- Classes\SftpClientTest.CreateDirectory.cs
-
-
- Classes\SftpClientTest.cs
-
-
- Classes\SftpClientTest.DeleteDirectory.cs
-
-
- Classes\SftpClientTest.DeleteFile.cs
-
-
- Classes\SftpClientTest.Download.cs
-
-
- Classes\SftpClientTest.ListDirectory.cs
-
-
- Classes\SftpClientTest.RenameFile.cs
-
-
- Classes\SftpClientTest.SynchronizeDirectories.cs
-
-
- Classes\SftpClientTest.Upload.cs
-
-
- Classes\Sftp\Requests\ExtendedRequests\FStatVfsRequestTest.cs
-
-
- Classes\Sftp\Requests\ExtendedRequests\HardLinkRequestTest.cs
-
-
- Classes\Sftp\Requests\ExtendedRequests\PosixRenameRequestTest.cs
-
-
- Classes\Sftp\Requests\ExtendedRequests\StatVfsRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpBlockRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpCloseRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpFSetStatRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpFStatRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpInitRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpLinkRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpLStatRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpMkDirRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpOpenDirRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpOpenRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpReadDirRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpReadLinkRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpReadRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpRealPathRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpRemoveRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpRenameRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpRmDirRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpSetStatRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpStatRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpSymLinkRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpUnblockRequestTest.cs
-
-
- Classes\Sftp\Requests\SftpWriteRequestTest.cs
-
-
- Classes\Sftp\Responses\ExtendedReplies\StatVfsReplyInfoTest.cs
-
-
- Classes\Sftp\Responses\SftpAttrsResponseTest.cs
-
-
- Classes\Sftp\Responses\SftpDataResponseTest.cs
-
-
- Classes\Sftp\Responses\SftpExtendedReplyResponseTest.cs
-
-
- Classes\Sftp\Responses\SftpHandleResponseTest.cs
-
-
- Classes\Sftp\Responses\SftpNameResponseTest.cs
-
-
- Classes\Sftp\Responses\SftpStatusResponseTest.cs
-
-
- Classes\Sftp\Responses\SftpVersionResponseTest.cs
-
-
- Classes\Sftp\SftpDataResponseBuilder.cs
-
-
- Classes\Sftp\SftpDownloadAsyncResultTest.cs
-
-
- Classes\Sftp\SftpFileAttributesTest.cs
-
-
- Classes\Sftp\SftpFileReaderTestBase.cs
-
-
- Classes\Sftp\SftpFileReaderTest_DisposeShouldUnblockReadAndReadAhead.cs
-
-
- Classes\Sftp\SftpFileReaderTest_Dispose_SftpSessionIsNotOpen.cs
-
-
- Classes\Sftp\SftpFileReaderTest_Dispose_SftpSessionIsOpen_BeginCloseThrowsException.cs
-
-
- Classes\Sftp\SftpFileReaderTest_Dispose_SftpSessionIsOpen_EndCloseThrowsException.cs
-
-
- Classes\Sftp\SftpFileReaderTest_LastChunkBeforeEofIsComplete.cs
-
-
- Classes\Sftp\SftpFileReaderTest_LastChunkBeforeEofIsPartial.cs
-
-
- Classes\Sftp\SftpFileReaderTest_PreviousChunkIsIncompleteAndEofIsNotReached.cs
-
-
- Classes\Sftp\SftpFileReaderTest_PreviousChunkIsIncompleteAndEofIsReached.cs
-
-
- Classes\Sftp\SftpFileReaderTest_ReadAheadBeginReadException.cs
-
-
- Classes\Sftp\SftpFileReaderTest_ReadAheadEndInvokeException_DiscardsFurtherReadAheads.cs
-
-
- Classes\Sftp\SftpFileReaderTest_ReadAheadEndInvokeException_PreventsFurtherReadAheads.cs
-
-
- Classes\Sftp\SftpFileReaderTest_ReadBackBeginReadException.cs
-
-
- Classes\Sftp\SftpFileReaderTest_ReadBackEndInvokeException.cs
-
-
- Classes\Sftp\SftpFileReaderTest_Read_ReadAheadExceptionInWaitOnHandle_ChunkAvailable.cs
-
-
- Classes\Sftp\SftpFileReaderTest_Read_ReadAheadExceptionInWaitOnHandle_NoChunkAvailable.cs
-
-
- Classes\Sftp\SftpFileReaderTest_Read_ReahAheadExceptionInBeginRead.cs
-
-
- Classes\Sftp\SftpFileStreamTestBase.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Close_Closed.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Close_Disposed.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Close_SessionNotOpen.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Close_SessionOpen.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileAccessInvalid.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeAppend_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeAppend_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeAppend_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreateNew_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreateNew_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreateNew_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreate_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreate_FileAccessReadWrite_FileDoesNotExist.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreate_FileAccessReadWrite_FileExists.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreate_FileAccessWrite_FileDoesNotExist.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeCreate_FileAccessWrite_FileExists.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeInvalid.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeOpenOrCreate_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeOpenOrCreate_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeOpenOrCreate_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeOpen_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeOpen_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeOpen_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeTruncate_FileAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeTruncate_FileAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Ctor_FileModeTruncate_FileAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Dispose_Closed.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Dispose_Disposed.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Dispose_SessionNotOpen.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Dispose_SessionOpen.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Finalize_SessionOpen.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Flush_ReadMode_DataInBuffer_NotReadFromBuffer.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Flush_ReadMode_DataInBuffer_ReadFromBuffer.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Flush_ReadMode_NoDataInBuffer.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Flush_SessionNotOpen.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Flush_WriteMode_DataInBuffer.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Flush_WriteMode_NoDataInBuffer.cs
-
-
- Classes\Sftp\SftpFileStreamTest_ReadByte_ReadMode_NoDataInWriteBufferAndNoDataInReadBuffer_Eof.cs
-
-
- Classes\Sftp\SftpFileStreamTest_ReadByte_ReadMode_NoDataInWriteBufferAndNoDataInReadBuffer_LessDataThanReadBufferSizeAvailable.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Read_ReadMode_NoDataInReaderBufferAndReadLessBytesFromServerThanCountAndEqualToBufferSize.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Read_ReadMode_NoDataInReaderBufferAndReadLessBytesFromServerThanCountAndLessThanBufferSize.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Read_ReadMode_NoDataInReaderBufferAndReadMoreBytesFromServerThanCount.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Seek_PositionedAtBeginningOfStream_OriginBeginAndOffsetNegative.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Seek_PositionedAtBeginningOfStream_OriginBeginAndOffsetPositive.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Seek_PositionedAtBeginningOfStream_OriginBeginAndOffsetZero.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Seek_PositionedAtMiddleOfStream_OriginBeginAndOffsetZero_NoBuffering.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Seek_PositionedAtMiddleOfStream_OriginBeginAndOffsetZero_ReadBuffer.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_Closed.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_DataInReadBuffer_NewLengthGreatherThanPosition.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_DataInReadBuffer_NewLengthLessThanPosition.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_DataInWriteBuffer_NewLengthGreatherThanPosition.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_DataInWriteBuffer_NewLengthLessThanPosition.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_Disposed.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_SessionNotOpen.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessRead.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessReadWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessWrite.cs
-
-
- Classes\Sftp\SftpFileStreamTest_Write_SessionOpen_CountGreatherThanTwoTimesTheWriteBufferSize.cs
-
-
- Classes\Sftp\SftpFileSystemInformationTest.cs
-
-
- Classes\Sftp\SftpFileTest.cs
-
-
- Classes\Sftp\SftpHandleResponseBuilder.cs
-
-
- Classes\Sftp\SftpInitRequestBuilder.cs
-
-
- Classes\Sftp\SftpListDirectoryAsyncResultTest.cs
-
-
- Classes\Sftp\SftpNameResponseBuilder.cs
-
-
- Classes\Sftp\SftpOpenRequestBuilder.cs
-
-
- Classes\Sftp\SftpReadRequestBuilder.cs
-
-
- Classes\Sftp\SftpRealPathRequestBuilder.cs
-
-
- Classes\Sftp\SftpSessionTest_Connected_RequestRead.cs
-
-
- Classes\Sftp\SftpSessionTest_Connected_RequestStatVfs.cs
-
-
- Classes\Sftp\SftpSessionTest_DataReceived_MultipleSftpMessagesInSingleSshDataMessage.cs
-
-
- Classes\Sftp\SftpSessionTest_DataReceived_MultipleSftpMessagesSplitOverMultipleSshDataMessages.cs
-
-
- Classes\Sftp\SftpSessionTest_DataReceived_SingleSftpMessageInSshDataMessage.cs
-
-
- Classes\Sftp\SftpStatVfsRequestBuilder.cs
-
-
- Classes\Sftp\SftpStatVfsResponseBuilder.cs
-
-
- Classes\Sftp\SftpSynchronizeDirectoriesAsyncResultTest.cs
-
-
- Classes\Sftp\SftpUploadAsyncResultTest.cs
-
-
- Classes\Sftp\SftpVersionResponseBuilder.cs
-
-
- Classes\ShellStreamTest.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferEmptyAndWriteLessBytesThanBufferSize.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferEmptyAndWriteMoreBytesThanBufferSize.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferEmptyAndWriteNumberOfBytesEqualToBufferSize.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferEmptyAndWriteZeroBytes.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferFullAndWriteLessBytesThanBufferSize.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferFullAndWriteZeroBytes.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferNotEmptyAndWriteLessBytesThanBufferCanContain.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferNotEmptyAndWriteMoreBytesThanBufferCanContain.cs
-
-
- Classes\ShellStreamTest_Write_WriteBufferNotEmptyAndWriteZeroBytes.cs
-
-
- Classes\ShellTestTest.cs
-
-
- Classes\SshClientTest.cs
-
-
- Classes\SshClientTest_CreateShellStream_TerminalNameAndColumnsAndRowsAndWidthAndHeightAndBufferSizeAndTerminalModes_Connected.cs
-
-
- Classes\SshClientTest_CreateShellStream_TerminalNameAndColumnsAndRowsAndWidthAndHeightAndBufferSize_Connected.cs
-
-
- Classes\SshClientTest_Disconnect_ForwardedPortStarted.cs
-
-
- Classes\SshClientTest_Dispose_ForwardedPortStarted.cs
-
-
- Classes\SshCommandTest.cs
-
-
- Classes\SshCommandTest_BeginExecute_EndExecuteInvokedOnAsyncResultFromPreviousInvocation.cs
-
-
- Classes\SshCommandTest_BeginExecute_EndExecuteNotInvokedOnAsyncResultFromPreviousInvocation.cs
-
-
- Classes\SshCommandTest_Dispose.cs
-
-
- Classes\SshCommandTest_EndExecute.cs
-
-
- Classes\SshCommandTest_EndExecute_AsyncResultFromOtherInstance.cs
-
-
- Classes\SshCommandTest_EndExecute_AsyncResultIsNull.cs
-
-
- Classes\SshCommandTest_EndExecute_ChannelOpen.cs
-
-
- Classes\SubsystemSessionStub.cs
-
-
- Classes\SubsystemSession_Connect_Connected.cs
-
-
- Classes\SubsystemSession_Connect_Disconnected.cs
-
-
- Classes\SubsystemSession_Connect_Disposed.cs
-
-
- Classes\SubsystemSession_Connect_NeverConnected.cs
-
-
- Classes\SubsystemSession_Disconnect_Connected.cs
-
-
- Classes\SubsystemSession_Disconnect_Disposed.cs
-
-
- Classes\SubsystemSession_Disconnect_NeverConnected.cs
-
-
- Classes\SubsystemSession_Dispose_Connected.cs
-
-
- Classes\SubsystemSession_Dispose_Disconnected.cs
-
-
- Classes\SubsystemSession_Dispose_Disposed.cs
-
-
- Classes\SubsystemSession_Dispose_NeverConnected.cs
-
-
- Classes\SubsystemSession_OnChannelDataReceived_Connected.cs
-
-
- Classes\SubsystemSession_OnChannelDataReceived_Disposed.cs
-
-
- Classes\SubsystemSession_OnChannelDataReceived_OnDataReceived_Exception.cs
-
-
- Classes\SubsystemSession_OnChannelException_Connected.cs
-
-
- Classes\SubsystemSession_OnChannelException_Disposed.cs
-
-
- Classes\SubsystemSession_OnSessionDisconnected_Connected.cs
-
-
- Classes\SubsystemSession_OnSessionDisconnected_Disposed.cs
-
-
- Classes\SubsystemSession_OnSessionErrorOccurred_Connected.cs
-
-
- Classes\SubsystemSession_OnSessionErrorOccurred_Disposed.cs
-
-
- Classes\SubsystemSession_SendData_Connected.cs
-
-
- Classes\SubsystemSession_SendData_Disconnected.cs
-
-
- Classes\SubsystemSession_SendData_Disposed.cs
-
-
- Classes\SubsystemSession_SendData_NeverConnected.cs
-
-
- Common\ArrayBuilder.cs
-
-
- Common\AsyncSocketListener.cs
-
-
- Common\DictionaryAssert.cs
-
-
- Common\Extensions.cs
-
-
- Common\HttpProxyStub.cs
-
-
- Common\HttpRequest.cs
-
-
- Common\SftpFileAttributesBuilder.cs
-
-
- Common\TestBase.cs
-
-
-
-
-
-
- Properties\CommonAssemblyInfo.cs
-
-
- True
- True
- Resources.resx
-
-
-
-
- {DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}
- Renci.SshNet.NET35
-
-
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
-
-
- Data\Key.RSA.Encrypted.Aes.128.CBC.12345.txt
-
-
- Data\Key.RSA.Encrypted.Aes.192.CBC.12345.txt
-
-
- Data\Key.RSA.Encrypted.Aes.256.CBC.12345.txt
-
-
- Data\Key.RSA.Encrypted.Des.CBC.12345.txt
-
-
- Data\Key.RSA.Encrypted.Des.Ede3.CBC.12345.txt
-
-
- Data\Key.RSA.Encrypted.Des.Ede3.CFB.1234567890.txt
-
-
- Data\Key.RSA.txt
-
-
-
-
- Renci.SshNet.snk
-
-
-
-
-
- Data\Key.SSH2.DSA.Encrypted.Des.CBC.12345.txt
-
-
- Data\Key.SSH2.DSA.txt
-
-
- Data\Key.SSH2.RSA.Encrypted.Des.CBC.12345.txt
-
-
- Data\Key.SSH2.RSA.txt
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests.NET35/packages.config b/src/Renci.SshNet.Tests.NET35/packages.config
deleted file mode 100644
index e9365957..00000000
--- a/src/Renci.SshNet.Tests.NET35/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connect_OnConnectedThrowsException.cs b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connect_OnConnectedThrowsException.cs
new file mode 100644
index 00000000..792ab89d
--- /dev/null
+++ b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connect_OnConnectedThrowsException.cs
@@ -0,0 +1,181 @@
+using System;
+using System.Reflection;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Security;
+
+namespace Renci.SshNet.Tests.Classes
+{
+ [TestClass]
+ public class BaseClientTest_Connect_OnConnectedThrowsException
+ {
+ private Mock _serviceFactoryMock;
+ private Mock _sessionMock;
+ private MyClient _client;
+ private ConnectionInfo _connectionInfo;
+ private ApplicationException _onConnectException;
+ private ApplicationException _actualException;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ Arrange();
+ Act();
+ }
+
+ [TestCleanup]
+ public void Cleanup()
+ {
+ if (_client != null)
+ {
+ _sessionMock.Setup(p => p.OnDisconnecting());
+ _sessionMock.Setup(p => p.Dispose());
+ _client.Dispose();
+ }
+ }
+
+ private void SetupData()
+ {
+ _connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
+ _onConnectException = new ApplicationException();
+ }
+
+ private void CreateMocks()
+ {
+ _serviceFactoryMock = new Mock(MockBehavior.Strict);
+ _sessionMock = new Mock(MockBehavior.Strict);
+ }
+
+ private void SetupMocks()
+ {
+ _serviceFactoryMock.Setup(p => p.CreateSession(_connectionInfo))
+ .Returns(_sessionMock.Object);
+ _sessionMock.Setup(p => p.Connect());
+ _sessionMock.Setup(p => p.Dispose());
+ }
+
+ protected void Arrange()
+ {
+ SetupData();
+ CreateMocks();
+ SetupMocks();
+
+ _client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object)
+ {
+ OnConnectedException = _onConnectException
+ };
+ }
+
+ protected void Act()
+ {
+ try
+ {
+ _client.Connect();
+ Assert.Fail();
+ }
+ catch (ApplicationException ex)
+ {
+ _actualException = ex;
+ }
+ }
+
+ [TestMethod]
+ public void ConnectShouldRethrowExceptionThrownByOnConnect()
+ {
+ Assert.IsNotNull(_actualException);
+ Assert.AreSame(_onConnectException, _actualException);
+ }
+
+ [TestMethod]
+ public void CreateSessionOnServiceFactoryShouldBeInvokedOnce()
+ {
+ _serviceFactoryMock.Verify(p => p.CreateSession(_connectionInfo), Times.Once);
+ }
+
+ [TestMethod]
+ public void ConnectOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.Connect(), Times.Once);
+ }
+
+ [TestMethod]
+ public void DisposeOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.Dispose(), Times.Once);
+ }
+
+ [TestMethod]
+ public void ErrorOccuredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnBaseClient()
+ {
+ var errorOccurredSignalCount = 0;
+
+ _client.ErrorOccurred += (sender, args) => Interlocked.Increment(ref errorOccurredSignalCount);
+
+ _sessionMock.Raise(p => p.ErrorOccured += null, new ExceptionEventArgs(new Exception()));
+
+ Assert.AreEqual(0, errorOccurredSignalCount);
+ }
+
+ [TestMethod]
+ public void HostKeyReceivedOnSessionShouldNoLongerBeSignaledViaHostKeyReceivedOnBaseClient()
+ {
+ var hostKeyReceivedSignalCount = 0;
+
+ _client.HostKeyReceived += (sender, args) => Interlocked.Increment(ref hostKeyReceivedSignalCount);
+
+ _sessionMock.Raise(p => p.HostKeyReceived += null, new HostKeyEventArgs(GetKeyHostAlgorithm()));
+
+ Assert.AreEqual(0, hostKeyReceivedSignalCount);
+ }
+
+ [TestMethod]
+ public void SessionShouldBeNull()
+ {
+ Assert.IsNull(_client.Session);
+ }
+
+ [TestMethod]
+ public void IsConnectedShouldReturnFalse()
+ {
+ Assert.IsFalse(_client.IsConnected);
+ }
+
+ private static KeyHostAlgorithm GetKeyHostAlgorithm()
+ {
+ var executingAssembly = Assembly.GetExecutingAssembly();
+
+ using (var s = executingAssembly.GetManifestResourceStream(string.Format("Renci.SshNet.Tests.Data.{0}", "Key.RSA.txt")))
+ {
+ var privateKey = new PrivateKeyFile(s);
+ return (KeyHostAlgorithm) privateKey.HostKey;
+ }
+ }
+
+ private class MyClient : BaseClient
+ {
+ private int _onConnectedCount;
+
+ public MyClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory) : base(connectionInfo, ownsConnectionInfo, serviceFactory)
+ {
+ }
+
+ public Exception OnConnectedException { get; set; }
+
+ protected override void OnConnected()
+ {
+ base.OnConnected();
+
+ Interlocked.Increment(ref _onConnectedCount);
+
+ if (OnConnectedException != null)
+ {
+ throw OnConnectedException;
+ }
+ }
+ }
+
+
+ }
+}
diff --git a/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAliveInterval_NegativeOne.cs b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAliveInterval_NegativeOne.cs
new file mode 100644
index 00000000..fb58e1f4
--- /dev/null
+++ b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAliveInterval_NegativeOne.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Messages.Transport;
+
+namespace Renci.SshNet.Tests.Classes
+{
+ [TestClass]
+ public class BaseClientTest_Connected_KeepAliveInterval_NegativeOne
+ {
+ private Mock _serviceFactoryMock;
+ private Mock _sessionMock;
+ private BaseClient _client;
+ private ConnectionInfo _connectionInfo;
+ private TimeSpan _keepAliveInterval;
+ private int _keepAliveCount;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ Arrange();
+ Act();
+ }
+
+ [TestCleanup]
+ public void Cleanup()
+ {
+ if (_client != null)
+ {
+ _sessionMock.Setup(p => p.OnDisconnecting());
+ _sessionMock.Setup(p => p.Dispose());
+ _client.Dispose();
+ }
+ }
+
+ private void SetupData()
+ {
+ _connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
+ _keepAliveInterval = TimeSpan.FromMilliseconds(100d);
+ _keepAliveCount = 0;
+ }
+
+ private void CreateMocks()
+ {
+ _serviceFactoryMock = new Mock(MockBehavior.Strict);
+ _sessionMock = new Mock(MockBehavior.Strict);
+ }
+
+ private void SetupMocks()
+ {
+ _serviceFactoryMock.Setup(p => p.CreateSession(_connectionInfo))
+ .Returns(_sessionMock.Object);
+ _sessionMock.Setup(p => p.Connect());
+ _sessionMock.Setup(p => p.IsConnected).Returns(true);
+ _sessionMock.Setup(p => p.TrySendMessage(It.IsAny()))
+ .Returns(true)
+ .Callback(() => Interlocked.Increment(ref _keepAliveCount));
+ }
+
+ protected void Arrange()
+ {
+ SetupData();
+ CreateMocks();
+ SetupMocks();
+
+ _client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object);
+ _client.Connect();
+ _client.KeepAliveInterval = _keepAliveInterval;
+ }
+
+ protected void Act()
+ {
+ // allow keep-alive to be sent once
+ Thread.Sleep(150);
+
+ // disable keep-alive
+ _client.KeepAliveInterval = TimeSpan.FromMilliseconds(-1);
+ }
+
+ [TestMethod]
+ public void KeepAliveIntervalShouldReturnConfiguredValue()
+ {
+ Assert.AreEqual(TimeSpan.FromMilliseconds(-1), _client.KeepAliveInterval);
+ }
+
+ [TestMethod]
+ public void CreateSessionOnServiceFactoryShouldBeInvokedOnce()
+ {
+ _serviceFactoryMock.Verify(p => p.CreateSession(_connectionInfo), Times.Once);
+ }
+
+ [TestMethod]
+ public void ConnectOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.Connect(), Times.Once);
+ }
+
+ [TestMethod]
+ public void IsConnectedOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.IsConnected, Times.Once);
+ }
+
+ [TestMethod]
+ public void SendMessageOnSessionShouldBeInvokedThreeTimes()
+ {
+ // allow keep-alive to be sent once
+ Thread.Sleep(100);
+
+ _sessionMock.Verify(p => p.TrySendMessage(It.IsAny()), Times.Exactly(1));
+ }
+
+ private class MyClient : BaseClient
+ {
+ public MyClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory) : base(connectionInfo, ownsConnectionInfo, serviceFactory)
+ {
+ }
+ }
+ }
+}
diff --git a/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAliveInterval_NotNegativeOne.cs b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAliveInterval_NotNegativeOne.cs
new file mode 100644
index 00000000..a3c807bd
--- /dev/null
+++ b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAliveInterval_NotNegativeOne.cs
@@ -0,0 +1,116 @@
+using System;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Messages.Transport;
+
+namespace Renci.SshNet.Tests.Classes
+{
+ [TestClass]
+ public class BaseClientTest_Connected_KeepAliveInterval_NotNegativeOne
+ {
+ private Mock _serviceFactoryMock;
+ private Mock _sessionMock;
+ private BaseClient _client;
+ private ConnectionInfo _connectionInfo;
+ private TimeSpan _keepAliveInterval;
+ private int _keepAliveCount;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ Arrange();
+ Act();
+ }
+
+ [TestCleanup]
+ public void Cleanup()
+ {
+ if (_client != null)
+ {
+ _sessionMock.Setup(p => p.OnDisconnecting());
+ _sessionMock.Setup(p => p.Dispose());
+ _client.Dispose();
+ }
+ }
+
+ private void SetupData()
+ {
+ _connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
+ _keepAliveInterval = TimeSpan.FromMilliseconds(50d);
+ _keepAliveCount = 0;
+ }
+
+ private void CreateMocks()
+ {
+ _serviceFactoryMock = new Mock(MockBehavior.Strict);
+ _sessionMock = new Mock(MockBehavior.Strict);
+ }
+
+ private void SetupMocks()
+ {
+ _serviceFactoryMock.Setup(p => p.CreateSession(_connectionInfo))
+ .Returns(_sessionMock.Object);
+ _sessionMock.Setup(p => p.Connect());
+ _sessionMock.Setup(p => p.IsConnected).Returns(true);
+ _sessionMock.Setup(p => p.TrySendMessage(It.IsAny()))
+ .Returns(true)
+ .Callback(() => Interlocked.Increment(ref _keepAliveCount));
+ }
+
+ protected void Arrange()
+ {
+ SetupData();
+ CreateMocks();
+ SetupMocks();
+
+ _client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object);
+ _client.Connect();
+ }
+
+ protected void Act()
+ {
+ _client.KeepAliveInterval = _keepAliveInterval;
+
+ // allow keep-alive to be sent a few times
+ Thread.Sleep(195);
+ }
+
+ [TestMethod]
+ public void KeepAliveIntervalShouldReturnConfiguredValue()
+ {
+ Assert.AreEqual(_keepAliveInterval, _client.KeepAliveInterval);
+ }
+
+ [TestMethod]
+ public void CreateSessionOnServiceFactoryShouldBeInvokedOnce()
+ {
+ _serviceFactoryMock.Verify(p => p.CreateSession(_connectionInfo), Times.Once);
+ }
+
+ [TestMethod]
+ public void ConnectOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.Connect(), Times.Once);
+ }
+
+ [TestMethod]
+ public void IsConnectedOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.IsConnected, Times.Once);
+ }
+
+ [TestMethod]
+ public void SendMessageOnSessionShouldBeInvokedThreeTimes()
+ {
+ _sessionMock.Verify(p => p.TrySendMessage(It.IsAny()), Times.Exactly(3));
+ }
+
+ private class MyClient : BaseClient
+ {
+ public MyClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory) : base(connectionInfo, ownsConnectionInfo, serviceFactory)
+ {
+ }
+ }
+ }
+}
diff --git a/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAlivesNotSentConcurrently.cs b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAlivesNotSentConcurrently.cs
index 262668d7..4430b657 100644
--- a/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAlivesNotSentConcurrently.cs
+++ b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAlivesNotSentConcurrently.cs
@@ -34,25 +34,38 @@ namespace Renci.SshNet.Tests.Classes
}
}
- protected void Arrange()
+ private void SetupData()
{
_connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
_keepAliveSent = new ManualResetEvent(false);
+ }
+ private void CreateMocks()
+ {
_serviceFactoryMock = new Mock(MockBehavior.Strict);
_sessionMock = new Mock(MockBehavior.Strict);
+ }
+ private void SetupMocks()
+ {
_mockSequence = new MockSequence();
_serviceFactoryMock.InSequence(_mockSequence).Setup(p => p.CreateSession(_connectionInfo)).Returns(_sessionMock.Object);
_sessionMock.InSequence(_mockSequence).Setup(p => p.Connect());
_sessionMock.InSequence(_mockSequence).Setup(p => p.TrySendMessage(It.IsAny()))
- .Returns(true)
- .Callback(() =>
- {
- Thread.Sleep(300);
- _keepAliveSent.Set();
- });
+ .Returns(true)
+ .Callback(() =>
+ {
+ Thread.Sleep(300);
+ _keepAliveSent.Set();
+ });
+ }
+
+ protected void Arrange()
+ {
+ SetupData();
+ CreateMocks();
+ SetupMocks();
_client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object)
{
diff --git a/src/Renci.SshNet.Tests/Classes/BaseClientTest_Disconnected_KeepAliveInterval_NotNegativeOne.cs b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Disconnected_KeepAliveInterval_NotNegativeOne.cs
new file mode 100644
index 00000000..588bfd83
--- /dev/null
+++ b/src/Renci.SshNet.Tests/Classes/BaseClientTest_Disconnected_KeepAliveInterval_NotNegativeOne.cs
@@ -0,0 +1,113 @@
+using System;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Messages.Transport;
+
+namespace Renci.SshNet.Tests.Classes
+{
+ [TestClass]
+ public class BaseClientTest_Disconnected_KeepAliveInterval_NotNegativeOne
+ {
+ private Mock _serviceFactoryMock;
+ private Mock _sessionMock;
+ private BaseClient _client;
+ private ConnectionInfo _connectionInfo;
+ private TimeSpan _keepAliveInterval;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ Arrange();
+ Act();
+ }
+
+ [TestCleanup]
+ public void Cleanup()
+ {
+ if (_client != null)
+ {
+ _sessionMock.Setup(p => p.OnDisconnecting());
+ _sessionMock.Setup(p => p.Dispose());
+ _client.Dispose();
+ }
+ }
+
+ private void SetupData()
+ {
+ _connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
+ _keepAliveInterval = TimeSpan.FromMilliseconds(50d);
+ }
+
+ private void CreateMocks()
+ {
+ _serviceFactoryMock = new Mock(MockBehavior.Strict);
+ _sessionMock = new Mock(MockBehavior.Strict);
+ }
+
+ private void SetupMocks()
+ {
+ _serviceFactoryMock.Setup(p => p.CreateSession(_connectionInfo))
+ .Returns(_sessionMock.Object);
+ _sessionMock.Setup(p => p.Connect());
+ _sessionMock.Setup(p => p.IsConnected).Returns(false);
+ _sessionMock.Setup(p => p.TrySendMessage(It.IsAny()))
+ .Returns(true);
+ }
+
+ protected void Arrange()
+ {
+ SetupData();
+ CreateMocks();
+ SetupMocks();
+
+ _client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object);
+ _client.Connect();
+ }
+
+ protected void Act()
+ {
+ _client.KeepAliveInterval = _keepAliveInterval;
+
+ // allow keep-alive to be sent a few times
+ Thread.Sleep(195);
+ }
+
+ [TestMethod]
+ public void KeepAliveIntervalShouldReturnConfiguredValue()
+ {
+ Assert.AreEqual(_keepAliveInterval, _client.KeepAliveInterval);
+ }
+
+ [TestMethod]
+ public void CreateSessionOnServiceFactoryShouldBeInvokedOnce()
+ {
+ _serviceFactoryMock.Verify(p => p.CreateSession(_connectionInfo), Times.Once);
+ }
+
+ [TestMethod]
+ public void ConnectOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.Connect(), Times.Once);
+ }
+
+ [TestMethod]
+ public void IsConnectedOnSessionShouldBeInvokedOnce()
+ {
+ _sessionMock.Verify(p => p.IsConnected, Times.Once);
+ }
+
+ [TestMethod]
+ public void SendMessageOnSessionShouldNeverBeInvoked()
+ {
+ _sessionMock.Verify(p => p.TrySendMessage(It.IsAny()), Times.Never);
+ }
+
+ private class MyClient : BaseClient
+ {
+ public MyClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory) : base(connectionInfo, ownsConnectionInfo, serviceFactory)
+ {
+ }
+ }
+ }
+}
diff --git a/src/Renci.SshNet.Tests/Classes/BaseClientTest_NotConnected_KeepAliveInterval_NotNegativeOne.cs b/src/Renci.SshNet.Tests/Classes/BaseClientTest_NotConnected_KeepAliveInterval_NotNegativeOne.cs
new file mode 100644
index 00000000..dfaa8b27
--- /dev/null
+++ b/src/Renci.SshNet.Tests/Classes/BaseClientTest_NotConnected_KeepAliveInterval_NotNegativeOne.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Messages.Transport;
+
+namespace Renci.SshNet.Tests.Classes
+{
+ [TestClass]
+ public class BaseClientTest_NotConnected_KeepAliveInterval_NotNegativeOne
+ {
+ private Mock _serviceFactoryMock;
+ private Mock _sessionMock;
+ private BaseClient _client;
+ private ConnectionInfo _connectionInfo;
+ private TimeSpan _keepAliveInterval;
+ private int _keepAliveCount;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ Arrange();
+ Act();
+ }
+
+ [TestCleanup]
+ public void Cleanup()
+ {
+ if (_client != null)
+ {
+ _sessionMock.Setup(p => p.OnDisconnecting());
+ _sessionMock.Setup(p => p.Dispose());
+ _client.Dispose();
+ }
+ }
+
+ private void SetupData()
+ {
+ _connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
+ _keepAliveInterval = TimeSpan.FromMilliseconds(100d);
+ _keepAliveCount = 0;
+ }
+
+ private void CreateMocks()
+ {
+ _serviceFactoryMock = new Mock(MockBehavior.Strict);
+ _sessionMock = new Mock(MockBehavior.Strict);
+ }
+
+ private static void SetupMocks()
+ {
+ }
+
+ protected void Arrange()
+ {
+ SetupData();
+ CreateMocks();
+ SetupMocks();
+
+ _client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object);
+ }
+
+ protected void Act()
+ {
+ _client.KeepAliveInterval = _keepAliveInterval;
+
+ // allow keep-alive to be sent at least once
+ Thread.Sleep(150);
+ }
+
+ [TestMethod]
+ public void KeepAliveIntervalShouldReturnConfiguredValue()
+ {
+ Assert.AreEqual(_keepAliveInterval, _client.KeepAliveInterval);
+ }
+
+ [TestMethod]
+ public void ConnectShouldActivateKeepAliveIfSessionIs()
+ {
+ _serviceFactoryMock.Setup(p => p.CreateSession(_connectionInfo)).Returns(_sessionMock.Object);
+ _sessionMock.Setup(p => p.Connect());
+ _sessionMock.Setup(p => p.TrySendMessage(It.IsAny()))
+ .Returns(true)
+ .Callback(() => Interlocked.Increment(ref _keepAliveCount));
+
+ _client.Connect();
+
+ // allow keep-alive to be sent twice
+ Thread.Sleep(250);
+
+ // Exactly two keep-alives should be sent
+ _sessionMock.Verify(p => p.TrySendMessage(It.IsAny()), Times.Exactly(2));
+ }
+
+ private class MyClient : BaseClient
+ {
+ public MyClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory) : base(connectionInfo, ownsConnectionInfo, serviceFactory)
+ {
+ }
+ }
+ }
+}
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs
index 804e477a..1dce239e 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs
@@ -27,6 +27,7 @@ namespace Renci.SshNet.Tests.Classes.Channels
private uint _remoteWindowSize;
private uint _remotePacketSize;
private uint _remoteChannelNumber;
+ private TimeSpan _channelCloseTimeout;
protected override void OnInit()
{
@@ -40,8 +41,9 @@ namespace Renci.SshNet.Tests.Classes.Channels
_port = (uint) random.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort);
_localChannelNumber = (uint) random.Next(0, int.MaxValue);
_remoteWindowSize = (uint) random.Next(0, int.MaxValue);
- _remotePacketSize = (uint)random.Next(100, 200);
- _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+ _remotePacketSize = (uint) random.Next(100, 200);
+ _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_sessionMock = new Mock(MockBehavior.Strict);
_forwardedPortMock = new Mock(MockBehavior.Strict);
@@ -53,11 +55,14 @@ namespace Renci.SshNet.Tests.Classes.Channels
{
_sessionMock.Setup(p => p.IsConnected).Returns(true);
_sessionMock.Setup(p => p.SendMessage(It.IsAny()))
- .Callback(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
- new MessageEventArgs(
- new ChannelOpenConfirmationMessage(((ChannelOpenMessage)m).LocalChannelNumber, _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
+ .Callback(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
+ new MessageEventArgs(
+ new ChannelOpenConfirmationMessage(((ChannelOpenMessage) m).LocalChannelNumber,
+ _remoteWindowSize,
+ _remotePacketSize,
+ _remoteChannelNumber))));
_sessionMock.Setup(p => p.WaitOnHandle(It.IsAny()))
- .Callback(p => p.WaitOne(Session.Infinite));
+ .Callback(p => p.WaitOne(Session.Infinite));
var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
@@ -65,25 +70,27 @@ namespace Renci.SshNet.Tests.Classes.Channels
localPortListener.Start();
localPortListener.Connected += socket =>
- {
- var channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
- _localPacketSize);
- channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
+ {
+ var channel = new ChannelDirectTcpip(_sessionMock.Object,
+ _localChannelNumber,
+ _localWindowSize,
+ _localPacketSize);
+ channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
- var closeForwardedPortThread =
- new Thread(() =>
- {
- // sleep for a short period to allow channel to actually start receiving from socket
- Thread.Sleep(100);
- // raise Closing event on forwarded port
- _forwardedPortMock.Raise(p => p.Closing += null, EventArgs.Empty);
- });
- closeForwardedPortThread.Start();
+ var closeForwardedPortThread =
+ new Thread(() =>
+ {
+ // sleep for a short period to allow channel to actually start receiving from socket
+ Thread.Sleep(100);
+ // raise Closing event on forwarded port
+ _forwardedPortMock.Raise(p => p.Closing += null, EventArgs.Empty);
+ });
+ closeForwardedPortThread.Start();
- channel.Bind();
+ channel.Bind();
- closeForwardedPortThread.Join();
- };
+ closeForwardedPortThread.Join();
+ };
var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
client.Connect(localPortEndPoint);
@@ -103,11 +110,14 @@ namespace Renci.SshNet.Tests.Classes.Channels
{
_sessionMock.Setup(p => p.IsConnected).Returns(true);
_sessionMock.Setup(p => p.SendMessage(It.IsAny()))
- .Callback(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
- new MessageEventArgs(
- new ChannelOpenConfirmationMessage(((ChannelOpenMessage)m).LocalChannelNumber, _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
+ .Callback(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
+ new MessageEventArgs(
+ new ChannelOpenConfirmationMessage(((ChannelOpenMessage) m).LocalChannelNumber,
+ _remoteWindowSize,
+ _remotePacketSize,
+ _remoteChannelNumber))));
_sessionMock.Setup(p => p.WaitOnHandle(It.IsAny()))
- .Callback(p => p.WaitOne(Session.Infinite));
+ .Callback(p => p.WaitOne(Session.Infinite));
var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
@@ -116,19 +126,21 @@ namespace Renci.SshNet.Tests.Classes.Channels
localPortListener.Connected += socket =>
{
- var channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
- _localPacketSize);
+ var channel = new ChannelDirectTcpip(_sessionMock.Object,
+ _localChannelNumber,
+ _localWindowSize,
+ _localPacketSize);
channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
var signalSessionErrorOccurredThread =
new Thread(() =>
- {
- // sleep for a short period to allow channel to actually start receiving from socket
- Thread.Sleep(100);
- // raise ErrorOccured event on session
- _sessionMock.Raise(s => s.ErrorOccured += null,
- new ExceptionEventArgs(new SystemException()));
- });
+ {
+ // sleep for a short period to allow channel to actually start receiving from socket
+ Thread.Sleep(100);
+ // raise ErrorOccured event on session
+ _sessionMock.Raise(s => s.ErrorOccured += null,
+ new ExceptionEventArgs(new SystemException()));
+ });
signalSessionErrorOccurredThread.Start();
channel.Bind();
@@ -152,34 +164,49 @@ namespace Renci.SshNet.Tests.Classes.Channels
[TestMethod]
public void SocketShouldBeClosedAndEofShouldBeSentToServerWhenClientShutsDownSocket()
{
- _sessionMock.Setup(p => p.IsConnected).Returns(true);
- _sessionMock.Setup(p => p.SendMessage(It.IsAny()))
- .Callback(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
- new MessageEventArgs(
- new ChannelOpenConfirmationMessage(((ChannelOpenMessage) m).LocalChannelNumber,
- _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
- _sessionMock.Setup(p => p.WaitOnHandle(It.IsAny()))
- .Callback(p => p.WaitOne(Session.Infinite));
- _sessionMock.Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.Setup(p => p.Timeout).Returns(TimeSpan.FromSeconds(60));
- _sessionMock.Setup(p => p.TrySendMessage(It.IsAny()))
- .Returns(true)
- .Callback(
- m => new Thread(() =>
- {
- Thread.Sleep(50);
- _sessionMock.Raise(s => s.ChannelEofReceived += null,
- new MessageEventArgs(new ChannelEofMessage(_localChannelNumber)));
- }).Start());
- _sessionMock.Setup(p => p.TrySendMessage(It.IsAny()))
- .Returns(true)
- .Callback(
- m => new Thread(() =>
- {
- Thread.Sleep(50);
- _sessionMock.Raise(s => s.ChannelCloseReceived += null,
- new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
- }).Start());
+ var sequence = new MockSequence();
+
+ _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+ _sessionMock.InSequence(sequence)
+ .Setup(p => p.SendMessage(It.IsAny()))
+ .Callback(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
+ new MessageEventArgs(
+ new ChannelOpenConfirmationMessage(((ChannelOpenMessage) m).LocalChannelNumber,
+ _remoteWindowSize,
+ _remotePacketSize,
+ _remoteChannelNumber))));
+ _sessionMock.InSequence(sequence)
+ .Setup(p => p.WaitOnHandle(It.IsAny()))
+ .Callback(p => p.WaitOne(Session.Infinite));
+ _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+ _sessionMock.InSequence(sequence)
+ .Setup(p => p.TrySendMessage(It.IsAny()))
+ .Returns(true)
+ .Callback(
+ m => new Thread(() =>
+ {
+ Thread.Sleep(50);
+ _sessionMock.Raise(s => s.ChannelEofReceived += null,
+ new MessageEventArgs(new ChannelEofMessage(_localChannelNumber)));
+ }).Start());
+ _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+ _sessionMock.InSequence(sequence)
+ .Setup(p => p.TrySendMessage(It.IsAny()))
+ .Returns(true)
+ .Callback(
+ m => new Thread(() =>
+ {
+ Thread.Sleep(50);
+ _sessionMock.Raise(s => s.ChannelCloseReceived += null,
+ new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
+ }).Start());
+ _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+ _connectionInfoMock.InSequence(sequence).Setup(p => p.ChannelCloseTimeout).Returns(_channelCloseTimeout);
+ _sessionMock.InSequence(sequence)
+ .Setup(p => p.TryWait(It.IsAny(), _channelCloseTimeout))
+ .Callback((waitHandle, channelCloseTimeout) => waitHandle.WaitOne())
+ .Returns(WaitResult.Success);
+
var channelBindFinishedWaitHandle = new ManualResetEvent(false);
Socket handler = null;
ChannelDirectTcpip channel = null;
@@ -190,17 +217,19 @@ namespace Renci.SshNet.Tests.Classes.Channels
localPortListener.Start();
localPortListener.Connected += socket =>
- {
- channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
- _localPacketSize);
- channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
- channel.Bind();
- channel.Dispose();
+ {
+ channel = new ChannelDirectTcpip(_sessionMock.Object,
+ _localChannelNumber,
+ _localWindowSize,
+ _localPacketSize);
+ channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
+ channel.Bind();
+ channel.Dispose();
- handler = socket;
+ handler = socket;
- channelBindFinishedWaitHandle.Set();
- };
+ channelBindFinishedWaitHandle.Set();
+ };
var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
client.Connect(localPortEndPoint);
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
index a99adce1..a75d407d 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
@@ -18,6 +18,7 @@ namespace Renci.SshNet.Tests.Classes.Channels
public class ChannelDirectTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen
{
private Mock _sessionMock;
+ private Mock _connectionInfoMock;
private Mock _forwardedPortMock;
private ChannelDirectTcpip _channel;
private uint _localChannelNumber;
@@ -26,6 +27,7 @@ namespace Renci.SshNet.Tests.Classes.Channels
private uint _remoteWindowSize;
private uint _remotePacketSize;
private uint _remoteChannelNumber;
+ private TimeSpan _channelCloseTimeout;
private string _remoteHost;
private uint _port;
private AsyncSocketListener _listener;
@@ -60,9 +62,11 @@ namespace Renci.SshNet.Tests.Classes.Channels
private void Arrange()
{
var random = new Random();
+
_localChannelNumber = (uint) random.Next(0, int.MaxValue);
_localWindowSize = (uint) random.Next(2000, 3000);
_localPacketSize = (uint) random.Next(1000, 2000);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_remoteHost = random.Next().ToString(CultureInfo.InvariantCulture);
_port = (uint) random.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort);
_channelBindFinishedWaitHandle = new ManualResetEvent(false);
@@ -74,6 +78,7 @@ namespace Renci.SshNet.Tests.Classes.Channels
_remotePacketSize = (uint)random.Next(100, 200);
_sessionMock = new Mock(MockBehavior.Strict);
+ _connectionInfoMock = new Mock(MockBehavior.Strict);
_forwardedPortMock = new Mock(MockBehavior.Strict);
var sequence = new MockSequence();
@@ -102,19 +107,20 @@ namespace Renci.SshNet.Tests.Classes.Channels
.Returns(true);
_sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
_sessionMock.InSequence(sequence)
- .Setup(
- p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber)))
+ .Setup(p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber)))
.Returns(true);
+ _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+ _connectionInfoMock.InSequence(sequence).Setup(p => p.ChannelCloseTimeout).Returns(_channelCloseTimeout);
_sessionMock.InSequence(sequence)
- .Setup(p => p.WaitOnHandle(It.IsNotNull()))
- .Callback(
- w =>
- {
- _sessionMock.Raise(
- s => s.ChannelCloseReceived += null,
- new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
- w.WaitOne();
- });
+ .Setup(p => p.TryWait(It.IsAny(), _channelCloseTimeout))
+ .Callback((waitHandle, channelCloseTimeout) =>
+ {
+ _sessionMock.Raise(
+ s => s.ChannelCloseReceived += null,
+ new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
+ waitHandle.WaitOne();
+ })
+ .Returns(WaitResult.Success);
var localEndpoint = new IPEndPoint(IPAddress.Loopback, 8122);
_listener = new AsyncSocketListener(localEndpoint);
@@ -122,11 +128,10 @@ namespace Renci.SshNet.Tests.Classes.Channels
{
try
{
- _channel = new ChannelDirectTcpip(
- _sessionMock.Object,
- _localChannelNumber,
- _localWindowSize,
- _localPacketSize);
+ _channel = new ChannelDirectTcpip(_sessionMock.Object,
+ _localChannelNumber,
+ _localWindowSize,
+ _localPacketSize);
_channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
_channel.Bind();
}
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelForwardedTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelForwardedTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
index 2ec4c9c9..bbbff6d3 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelForwardedTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelForwardedTcpipTest_Dispose_SessionIsConnectedAndChannelIsOpen.cs
@@ -25,6 +25,7 @@ namespace Renci.SshNet.Tests.Classes.Channels
private uint _remoteWindowSize;
private uint _remotePacketSize;
private uint _remoteChannelNumber;
+ private TimeSpan _channelCloseTimeout;
private IPEndPoint _remoteEndpoint;
private AsyncSocketListener _remoteListener;
private EventWaitHandle _channelBindFinishedWaitHandle;
@@ -72,6 +73,7 @@ namespace Renci.SshNet.Tests.Classes.Channels
_remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
_remoteWindowSize = (uint) random.Next(0, int.MaxValue);
_remotePacketSize = (uint) random.Next(100, 200);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_channelBindFinishedWaitHandle = new ManualResetEvent(false);
_channelException = null;
_connectedRegister = new List();
@@ -109,16 +111,18 @@ namespace Renci.SshNet.Tests.Classes.Channels
.Setup(
p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber)))
.Returns(true);
+ _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+ _connectionInfoMock.InSequence(sequence).Setup(p => p.ChannelCloseTimeout).Returns(_channelCloseTimeout);
_sessionMock.InSequence(sequence)
- .Setup(p => p.WaitOnHandle(It.IsNotNull()))
- .Callback(
- w =>
+ .Setup(p => p.TryWait(It.IsAny(), _channelCloseTimeout))
+ .Callback((waitHandle, channelCloseTimeout) =>
{
_sessionMock.Raise(
s => s.ChannelCloseReceived += null,
new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
- w.WaitOne();
- });
+ waitHandle.WaitOne();
+ })
+ .Returns(WaitResult.Success);
_remoteListener = new AsyncSocketListener(_remoteEndpoint);
_remoteListener.Connected += socket => _connectedRegister.Add(socket);
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTestBase.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTestBase.cs
new file mode 100644
index 00000000..52dfabb9
--- /dev/null
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTestBase.cs
@@ -0,0 +1,37 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+ public abstract class ChannelSessionTestBase
+ {
+ internal Mock SessionMock { get; private set; }
+ internal Mock ConnectionInfoMock { get; private set; }
+
+ [TestInitialize]
+ public void Initialize()
+ {
+ Arrange();
+ Act();
+ }
+
+ protected abstract void SetupData();
+
+ protected void CreateMocks()
+ {
+ SessionMock = new Mock(MockBehavior.Strict);
+ ConnectionInfoMock = new Mock(MockBehavior.Strict);
+ }
+
+ protected abstract void SetupMocks();
+
+ protected virtual void Arrange()
+ {
+ SetupData();
+ CreateMocks();
+ SetupMocks();
+ }
+
+ protected abstract void Act();
+ }
+}
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_Disposed.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_Disposed.cs
index 75461290..379f7e18 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_Disposed.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_Disposed.cs
@@ -10,10 +10,8 @@ using Renci.SshNet.Messages.Connection;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_Disposed
+ public class ChannelSessionTest_Dispose_Disposed : ChannelSessionTestBase
{
- private Mock _sessionMock;
- private Mock _connectionInfoMock;
private ChannelSession _channel;
private uint _localChannelNumber;
private uint _localWindowSize;
@@ -21,38 +19,35 @@ namespace Renci.SshNet.Tests.Classes.Channels
private uint _remoteWindowSize;
private uint _remotePacketSize;
private uint _remoteChannelNumber;
+ private TimeSpan _channelCloseTimeout;
private SemaphoreLight _sessionSemaphore;
private IList _channelClosedRegister;
private List _channelExceptionRegister;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
+
_localChannelNumber = (uint)random.Next(0, int.MaxValue);
_localWindowSize = (uint)random.Next(2000, 3000);
_localPacketSize = (uint)random.Next(1000, 2000);
_remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
_remoteWindowSize = (uint)random.Next(0, int.MaxValue);
_remotePacketSize = (uint)random.Next(100, 200);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_sessionSemaphore = new SemaphoreLight(1);
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
-
+ protected override void SetupMocks()
+ {
var sequence = new MockSequence();
- _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(sequence)
+
+ SessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(sequence)
.Setup(
p =>
p.SendMessage(
@@ -61,12 +56,12 @@ namespace Renci.SshNet.Tests.Classes.Channels
m.LocalChannelNumber == _localChannelNumber &&
m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(sequence)
+ SessionMock.InSequence(sequence)
.Setup(p => p.WaitOnHandle(It.IsNotNull()))
.Callback(
w =>
{
- _sessionMock.Raise(
+ SessionMock.Raise(
s => s.ChannelOpenConfirmationReceived += null,
new MessageEventArgs(
new ChannelOpenConfirmationMessage(
@@ -76,31 +71,39 @@ namespace Renci.SshNet.Tests.Classes.Channels
_remoteChannelNumber)));
w.WaitOne();
});
- _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(sequence)
+ SessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(sequence)
.Setup(p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
- _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(sequence)
+ SessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(sequence)
.Setup(p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
- _sessionMock.InSequence(sequence)
- .Setup(p => p.WaitOnHandle(It.IsNotNull()))
- .Callback(
- w =>
- {
- _sessionMock.Raise(
- s => s.ChannelCloseReceived += null,
- new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
- w.WaitOne();
- });
+ SessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(sequence).Setup(p => p.ChannelCloseTimeout).Returns(_channelCloseTimeout);
+ SessionMock.InSequence(sequence)
+ .Setup(p => p.TryWait(It.IsNotNull(), _channelCloseTimeout))
+ .Callback(
+ (waitHandle, channelCloseTimeout) =>
+ {
+ SessionMock.Raise(
+ s => s.ChannelCloseReceived += null,
+ new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
+ waitHandle.WaitOne();
+ })
+ .Returns(WaitResult.Success);
+ }
- _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+ protected override void Arrange()
+ {
+ base.Arrange();
+
+ _channel = new ChannelSession(SessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
_channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
_channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
_channel.Open();
_channel.Dispose();
}
- protected virtual void Act()
+ protected override void Act()
{
_channel.Dispose();
}
@@ -113,13 +116,13 @@ namespace Renci.SshNet.Tests.Classes.Channels
[TestMethod]
public void ChannelEofMessageShouldBeSentOnce()
{
- _sessionMock.Verify(p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+ SessionMock.Verify(p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
}
[TestMethod]
public void ChannelCloseMessageShouldBeSentOnce()
{
- _sessionMock.Verify(p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+ SessionMock.Verify(p => p.TrySendMessage(It.Is(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
}
[TestMethod]
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_DisposeInEventHandler.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_DisposeInEventHandler.cs
index 35e70ac3..be4fdc30 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_DisposeInEventHandler.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_DisposeInEventHandler.cs
@@ -11,52 +11,47 @@ using Renci.SshNet.Tests.Common;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_DisposeInEventHandler
+ public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_DisposeInEventHandler : ChannelSessionTestBase
{
- private Mock _sessionMock;
private uint _localChannelNumber;
private uint _localWindowSize;
private uint _localPacketSize;
private uint _remoteChannelNumber;
private uint _remoteWindowSize;
private uint _remotePacketSize;
+ private TimeSpan _channelCloseTimeout;
private IList _channelClosedRegister;
private List _channelExceptionRegister;
private ChannelSession _channel;
- private Mock _connectionInfoMock;
private MockSequence _sequence;
private SemaphoreLight _sessionSemaphore;
private int _initialSessionSemaphoreCount;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
- _localChannelNumber = (uint)random.Next(0, int.MaxValue);
- _localWindowSize = (uint)random.Next(0, int.MaxValue);
- _localPacketSize = (uint)random.Next(0, int.MaxValue);
- _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
- _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
- _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+
+ _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _localWindowSize = (uint) random.Next(0, int.MaxValue);
+ _localPacketSize = (uint) random.Next(0, int.MaxValue);
+ _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+ _remotePacketSize = (uint) random.Next(0, int.MaxValue);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
_initialSessionSemaphoreCount = random.Next(10, 20);
_sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
-
+ protected override void SetupMocks()
+ {
_sequence = new MockSequence();
- _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(_sequence)
+
+ SessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(_sequence)
.Setup(
p =>
p.SendMessage(
@@ -65,12 +60,12 @@ namespace Renci.SshNet.Tests.Classes.Channels
m.LocalChannelNumber == _localChannelNumber &&
m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(_sequence)
+ SessionMock.InSequence(_sequence)
.Setup(p => p.WaitOnHandle(It.IsNotNull()))
.Callback(
w =>
{
- _sessionMock.Raise(
+ SessionMock.Raise(
s => s.ChannelOpenConfirmationReceived += null,
new MessageEventArgs(
new ChannelOpenConfirmationMessage(
@@ -80,15 +75,23 @@ namespace Renci.SshNet.Tests.Classes.Channels
_remoteChannelNumber)));
w.WaitOne();
});
- _sessionMock.InSequence(_sequence).Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(_sequence)
+ SessionMock.InSequence(_sequence).Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(_sequence)
.Setup(p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
.Returns(true);
- _sessionMock.InSequence(_sequence)
- .Setup(s => s.WaitOnHandle(It.IsNotNull()))
- .Callback(w => w.WaitOne());
+ SessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(_sequence).Setup(p => p.ChannelCloseTimeout).Returns(_channelCloseTimeout);
+ SessionMock.InSequence(_sequence)
+ .Setup(p => p.TryWait(It.IsNotNull(), _channelCloseTimeout))
+ .Callback((waitHandle, channelCloseTimeout) => waitHandle.WaitOne())
+ .Returns(WaitResult.Success);
+ }
- _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+ protected override void Arrange()
+ {
+ base.Arrange();
+
+ _channel = new ChannelSession(SessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
_channel.Closed += (sender, args) =>
{
_channelClosedRegister.Add(args);
@@ -97,13 +100,13 @@ namespace Renci.SshNet.Tests.Classes.Channels
_channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
_channel.Open();
- _sessionMock.Raise(p => p.ChannelEofReceived += null,
+ SessionMock.Raise(p => p.ChannelEofReceived += null,
new MessageEventArgs(new ChannelEofMessage(_localChannelNumber)));
- _sessionMock.Raise(p => p.ChannelCloseReceived += null,
+ SessionMock.Raise(p => p.ChannelCloseReceived += null,
new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
}
- private void Act()
+ protected override void Act()
{
_channel.Dispose();
}
@@ -133,4 +136,4 @@ namespace Renci.SshNet.Tests.Classes.Channels
Assert.IsFalse(_channel.IsOpen);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs
index 4f5590f4..aac5c837 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs
@@ -10,9 +10,8 @@ using Renci.SshNet.Messages.Connection;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure
+ public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure : ChannelSessionTestBase
{
- private Mock _sessionMock;
private uint _localChannelNumber;
private uint _localWindowSize;
private uint _localPacketSize;
@@ -22,83 +21,82 @@ namespace Renci.SshNet.Tests.Classes.Channels
private IList _channelClosedRegister;
private List _channelExceptionRegister;
private ChannelSession _channel;
- private Mock _connectionInfoMock;
private MockSequence _sequence;
private SemaphoreLight _sessionSemaphore;
private int _initialSessionSemaphoreCount;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
- _localChannelNumber = (uint)random.Next(0, int.MaxValue);
- _localWindowSize = (uint)random.Next(0, int.MaxValue);
- _localPacketSize = (uint)random.Next(0, int.MaxValue);
- _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
- _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
- _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+
+ _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _localWindowSize = (uint) random.Next(0, int.MaxValue);
+ _localPacketSize = (uint) random.Next(0, int.MaxValue);
+ _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+ _remotePacketSize = (uint) random.Next(0, int.MaxValue);
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
_initialSessionSemaphoreCount = random.Next(10, 20);
_sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
-
+ protected override void SetupMocks()
+ {
_sequence = new MockSequence();
- _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p =>
- p.SendMessage(
- It.Is(
- m =>
- m.LocalChannelNumber == _localChannelNumber &&
- m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
- m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(_sequence)
- .Setup(p => p.WaitOnHandle(It.IsNotNull()))
- .Callback(
- w =>
- {
- _sessionMock.Raise(
- s => s.ChannelOpenConfirmationReceived += null,
- new MessageEventArgs(
- new ChannelOpenConfirmationMessage(
- _localChannelNumber,
- _remoteWindowSize,
- _remotePacketSize,
- _remoteChannelNumber)));
- w.WaitOne();
- });
- _sessionMock.Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
- .Returns(false);
- _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+ SessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(_sequence)
+ .Setup(
+ p =>
+ p.SendMessage(
+ It.Is(
+ m =>
+ m.LocalChannelNumber == _localChannelNumber &&
+ m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+ m.Info is SessionChannelOpenInfo)));
+ SessionMock.InSequence(_sequence)
+ .Setup(p => p.WaitOnHandle(It.IsNotNull()))
+ .Callback(
+ w =>
+ {
+ SessionMock.Raise(
+ s => s.ChannelOpenConfirmationReceived += null,
+ new MessageEventArgs(
+ new ChannelOpenConfirmationMessage(
+ _localChannelNumber,
+ _remoteWindowSize,
+ _remotePacketSize,
+ _remoteChannelNumber)));
+ w.WaitOne();
+ });
+ SessionMock.Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(_sequence)
+ .Setup(
+ p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
+ .Returns(false);
+ }
+
+ protected override void Arrange()
+ {
+ base.Arrange();
+
+ _channel = new ChannelSession(SessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
_channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
_channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
_channel.Open();
- _sessionMock.Raise(
+ SessionMock.Raise(
p => p.ChannelEofReceived += null,
new MessageEventArgs(new ChannelEofMessage(_localChannelNumber)));
- _sessionMock.Raise(
+ SessionMock.Raise(
p => p.ChannelCloseReceived += null,
new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
}
- private void Act()
+ protected override void Act()
{
_channel.Dispose();
}
@@ -128,4 +126,4 @@ namespace Renci.SshNet.Tests.Classes.Channels
Assert.IsFalse(_channel.IsOpen);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs
index 8f007fb3..dd17c5ab 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs
@@ -11,98 +11,100 @@ using Renci.SshNet.Tests.Common;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess
+ public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess : ChannelSessionTestBase
{
- private Mock _sessionMock;
private uint _localChannelNumber;
private uint _localWindowSize;
private uint _localPacketSize;
private uint _remoteChannelNumber;
private uint _remoteWindowSize;
private uint _remotePacketSize;
+ private TimeSpan _channelCloseTimeout;
private IList _channelClosedRegister;
private List _channelExceptionRegister;
private ChannelSession _channel;
- private Mock _connectionInfoMock;
- private MockSequence _sequence;
private SemaphoreLight _sessionSemaphore;
private int _initialSessionSemaphoreCount;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
+
_localChannelNumber = (uint) random.Next(0, int.MaxValue);
_localWindowSize = (uint) random.Next(0, int.MaxValue);
_localPacketSize = (uint) random.Next(0, int.MaxValue);
_remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
_remoteWindowSize = (uint) random.Next(0, int.MaxValue);
_remotePacketSize = (uint) random.Next(0, int.MaxValue);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
_initialSessionSemaphoreCount = random.Next(10, 20);
_sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
+ protected override void SetupMocks()
+ {
+ var sequence = new MockSequence();
- _sequence = new MockSequence();
- _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p =>
- p.SendMessage(
- It.Is(
- m =>
- m.LocalChannelNumber == _localChannelNumber &&
- m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
- m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(_sequence)
- .Setup(p => p.WaitOnHandle(It.IsNotNull()))
- .Callback(
- w =>
- {
- _sessionMock.Raise(
- s => s.ChannelOpenConfirmationReceived += null,
- new MessageEventArgs(
- new ChannelOpenConfirmationMessage(
- _localChannelNumber,
- _remoteWindowSize,
- _remotePacketSize,
- _remoteChannelNumber)));
- w.WaitOne();
- });
- _sessionMock.InSequence(_sequence).Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
- .Returns(true);
- _sessionMock.InSequence(_sequence)
- .Setup(s => s.WaitOnHandle(It.IsNotNull()))
- .Callback(w => w.WaitOne());
+ SessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(sequence)
+ .Setup(
+ p =>
+ p.SendMessage(
+ It.Is(
+ m =>
+ m.LocalChannelNumber == _localChannelNumber &&
+ m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+ m.Info is SessionChannelOpenInfo)));
+ SessionMock.InSequence(sequence)
+ .Setup(p => p.WaitOnHandle(It.IsNotNull()))
+ .Callback(
+ w =>
+ {
+ SessionMock.Raise(
+ s => s.ChannelOpenConfirmationReceived += null,
+ new MessageEventArgs(
+ new ChannelOpenConfirmationMessage(
+ _localChannelNumber,
+ _remoteWindowSize,
+ _remotePacketSize,
+ _remoteChannelNumber)));
+ w.WaitOne();
+ });
+ SessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(sequence)
+ .Setup(
+ p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
+ .Returns(true);
+ SessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(sequence).Setup(p => p.ChannelCloseTimeout).Returns(_channelCloseTimeout);
+ SessionMock.InSequence(sequence)
+ .Setup(p => p.TryWait(It.IsNotNull(), _channelCloseTimeout))
+ .Callback((waitHandle, channelCloseTimeout) => waitHandle.WaitOne())
+ .Returns(WaitResult.Success);
+ }
- _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+ protected override void Arrange()
+ {
+ base.Arrange();
+
+ _channel = new ChannelSession(SessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
_channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
_channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
_channel.Open();
- _sessionMock.Raise(
+ SessionMock.Raise(
p => p.ChannelEofReceived += null,
new MessageEventArgs(new ChannelEofMessage(_localChannelNumber)));
- _sessionMock.Raise(
+ SessionMock.Raise(
p => p.ChannelCloseReceived += null,
new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
}
- private void Act()
+ protected override void Act()
{
_channel.Dispose();
}
@@ -132,4 +134,4 @@ namespace Renci.SshNet.Tests.Classes.Channels
Assert.IsFalse(_channel.IsOpen);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs
index 049d90f1..251adf5d 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs
@@ -10,9 +10,8 @@ using Renci.SshNet.Messages.Connection;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure
+ public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure : ChannelSessionTestBase
{
- private Mock _sessionMock;
private uint _localChannelNumber;
private uint _localWindowSize;
private uint _localPacketSize;
@@ -22,80 +21,79 @@ namespace Renci.SshNet.Tests.Classes.Channels
private IList _channelClosedRegister;
private List _channelExceptionRegister;
private ChannelSession _channel;
- private Mock _connectionInfoMock;
private MockSequence _sequence;
private SemaphoreLight _sessionSemaphore;
private int _initialSessionSemaphoreCount;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
- _localChannelNumber = (uint)random.Next(0, int.MaxValue);
- _localWindowSize = (uint)random.Next(0, int.MaxValue);
- _localPacketSize = (uint)random.Next(0, int.MaxValue);
- _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
- _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
- _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+
+ _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _localWindowSize = (uint) random.Next(0, int.MaxValue);
+ _localPacketSize = (uint) random.Next(0, int.MaxValue);
+ _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+ _remotePacketSize = (uint) random.Next(0, int.MaxValue);
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
_initialSessionSemaphoreCount = random.Next(10, 20);
_sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
-
+ protected override void SetupMocks()
+ {
_sequence = new MockSequence();
- _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p =>
- p.SendMessage(
- It.Is(
- m =>
- m.LocalChannelNumber == _localChannelNumber &&
- m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
- m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(_sequence)
- .Setup(p => p.WaitOnHandle(It.IsNotNull()))
- .Callback(
- w =>
- {
- _sessionMock.Raise(
- s => s.ChannelOpenConfirmationReceived += null,
- new MessageEventArgs(
- new ChannelOpenConfirmationMessage(
- _localChannelNumber,
- _remoteWindowSize,
- _remotePacketSize,
- _remoteChannelNumber)));
- w.WaitOne();
- });
- _sessionMock.Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
- .Returns(false);
- _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+ SessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(_sequence)
+ .Setup(
+ p =>
+ p.SendMessage(
+ It.Is(
+ m =>
+ m.LocalChannelNumber == _localChannelNumber &&
+ m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+ m.Info is SessionChannelOpenInfo)));
+ SessionMock.InSequence(_sequence)
+ .Setup(p => p.WaitOnHandle(It.IsNotNull()))
+ .Callback(
+ w =>
+ {
+ SessionMock.Raise(
+ s => s.ChannelOpenConfirmationReceived += null,
+ new MessageEventArgs(
+ new ChannelOpenConfirmationMessage(
+ _localChannelNumber,
+ _remoteWindowSize,
+ _remotePacketSize,
+ _remoteChannelNumber)));
+ w.WaitOne();
+ });
+ SessionMock.Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(_sequence)
+ .Setup(
+ p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
+ .Returns(false);
+ }
+
+ protected override void Arrange()
+ {
+ base.Arrange();
+
+ _channel = new ChannelSession(SessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
_channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
_channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
_channel.Open();
- _sessionMock.Raise(
+ SessionMock.Raise(
p => p.ChannelCloseReceived += null,
new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
}
- private void Act()
+ protected override void Act()
{
_channel.Dispose();
}
@@ -125,4 +123,4 @@ namespace Renci.SshNet.Tests.Classes.Channels
Assert.IsFalse(_channel.IsOpen);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs
index dcb0a8fb..37dff92f 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs
@@ -11,52 +11,46 @@ using Renci.SshNet.Tests.Common;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess
+ public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess : ChannelSessionTestBase
{
- private Mock _sessionMock;
private uint _localChannelNumber;
private uint _localWindowSize;
private uint _localPacketSize;
private uint _remoteChannelNumber;
private uint _remoteWindowSize;
private uint _remotePacketSize;
+ private TimeSpan _channelCloseTimeout;
private IList _channelClosedRegister;
private List _channelExceptionRegister;
private ChannelSession _channel;
- private Mock _connectionInfoMock;
- private MockSequence _sequence;
private SemaphoreLight _sessionSemaphore;
private int _initialSessionSemaphoreCount;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
+
_localChannelNumber = (uint) random.Next(0, int.MaxValue);
_localWindowSize = (uint) random.Next(0, int.MaxValue);
_localPacketSize = (uint) random.Next(0, int.MaxValue);
_remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
_remoteWindowSize = (uint) random.Next(0, int.MaxValue);
_remotePacketSize = (uint) random.Next(0, int.MaxValue);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
_initialSessionSemaphoreCount = random.Next(10, 20);
_sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
+ protected override void SetupMocks()
+ {
+ var sequence = new MockSequence();
- _sequence = new MockSequence();
- _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(_sequence)
+ SessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(sequence)
.Setup(
p =>
p.SendMessage(
@@ -65,12 +59,12 @@ namespace Renci.SshNet.Tests.Classes.Channels
m.LocalChannelNumber == _localChannelNumber &&
m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(_sequence)
+ SessionMock.InSequence(sequence)
.Setup(p => p.WaitOnHandle(It.IsNotNull()))
.Callback(
w =>
{
- _sessionMock.Raise(
+ SessionMock.Raise(
s => s.ChannelOpenConfirmationReceived += null,
new MessageEventArgs(
new ChannelOpenConfirmationMessage(
@@ -80,26 +74,34 @@ namespace Renci.SshNet.Tests.Classes.Channels
_remoteChannelNumber)));
w.WaitOne();
});
- _sessionMock.InSequence(_sequence).Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(_sequence)
+ SessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(sequence)
.Setup(
p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
.Returns(true);
- _sessionMock.InSequence(_sequence)
- .Setup(s => s.WaitOnHandle(It.IsNotNull()))
- .Callback(w => w.WaitOne());
+ SessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(sequence).Setup(p => p.ChannelCloseTimeout).Returns(_channelCloseTimeout);
+ SessionMock.InSequence(sequence)
+ .Setup(p => p.TryWait(It.IsNotNull(), _channelCloseTimeout))
+ .Callback((waitHandle, channelCloseTimeout) => waitHandle.WaitOne())
+ .Returns(WaitResult.Success);
+ }
- _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+ protected override void Arrange()
+ {
+ base.Arrange();
+
+ _channel = new ChannelSession(SessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
_channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
_channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
_channel.Open();
- _sessionMock.Raise(
+ SessionMock.Raise(
p => p.ChannelCloseReceived += null,
new MessageEventArgs(new ChannelCloseMessage(_localChannelNumber)));
}
- private void Act()
+ protected override void Act()
{
_channel.Dispose();
}
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs
index 3173232f..83b40b32 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs
@@ -10,9 +10,8 @@ using Renci.SshNet.Messages.Connection;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure
+ public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure : ChannelSessionTestBase
{
- private Mock _sessionMock;
private uint _localChannelNumber;
private uint _localWindowSize;
private uint _localPacketSize;
@@ -22,80 +21,78 @@ namespace Renci.SshNet.Tests.Classes.Channels
private IList _channelClosedRegister;
private List _channelExceptionRegister;
private ChannelSession _channel;
- private Mock _connectionInfoMock;
private MockSequence _sequence;
private SemaphoreLight _sessionSemaphore;
private int _initialSessionSemaphoreCount;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
- _localChannelNumber = (uint)random.Next(0, int.MaxValue);
- _localWindowSize = (uint)random.Next(0, int.MaxValue);
- _localPacketSize = (uint)random.Next(0, int.MaxValue);
- _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
- _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
- _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+
+ _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _localWindowSize = (uint) random.Next(0, int.MaxValue);
+ _localPacketSize = (uint) random.Next(0, int.MaxValue);
+ _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+ _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+ _remotePacketSize = (uint) random.Next(0, int.MaxValue);
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
_initialSessionSemaphoreCount = random.Next(10, 20);
_sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
-
+ protected override void SetupMocks()
+ {
_sequence = new MockSequence();
- _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p =>
- p.SendMessage(
- It.Is(
- m =>
- m.LocalChannelNumber == _localChannelNumber &&
- m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
- m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(_sequence)
- .Setup(p => p.WaitOnHandle(It.IsNotNull()))
- .Callback(
- w =>
- {
- _sessionMock.Raise(
- s => s.ChannelOpenConfirmationReceived += null,
- new MessageEventArgs(
- new ChannelOpenConfirmationMessage(
- _localChannelNumber,
- _remoteWindowSize,
- _remotePacketSize,
- _remoteChannelNumber)));
- w.WaitOne();
- });
- _sessionMock.Setup(p => p.IsConnected).Returns(true);
- _sessionMock.InSequence(_sequence)
- .Setup(
- p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
- .Returns(false);
+ SessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(_sequence)
+ .Setup(
+ p =>
+ p.SendMessage(
+ It.Is(
+ m =>
+ m.LocalChannelNumber == _localChannelNumber &&
+ m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+ m.Info is SessionChannelOpenInfo)));
+ SessionMock.InSequence(_sequence)
+ .Setup(p => p.WaitOnHandle(It.IsNotNull()))
+ .Callback(
+ w =>
+ {
+ SessionMock.Raise(
+ s => s.ChannelOpenConfirmationReceived += null,
+ new MessageEventArgs(
+ new ChannelOpenConfirmationMessage(
+ _localChannelNumber,
+ _remoteWindowSize,
+ _remotePacketSize,
+ _remoteChannelNumber)));
+ w.WaitOne();
+ });
+ SessionMock.Setup(p => p.IsConnected).Returns(true);
+ SessionMock.InSequence(_sequence)
+ .Setup(
+ p => p.TrySendMessage(It.Is(c => c.LocalChannelNumber == _remoteChannelNumber)))
+ .Returns(false);
+ }
- _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+ protected override void Arrange()
+ {
+ base.Arrange();
+
+ _channel = new ChannelSession(SessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
_channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
_channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
_channel.Open();
- _sessionMock.Raise(
+ SessionMock.Raise(
p => p.ChannelEofReceived += null,
new MessageEventArgs(new ChannelEofMessage(_localChannelNumber)));
}
- private void Act()
+ protected override void Act()
{
_channel.Dispose();
}
@@ -124,4 +121,4 @@ namespace Renci.SshNet.Tests.Classes.Channels
Assert.IsFalse(_channel.IsOpen);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs
index f0b7bd01..5ab59626 100644
--- a/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs
+++ b/src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs
@@ -10,52 +10,46 @@ using Renci.SshNet.Messages.Connection;
namespace Renci.SshNet.Tests.Classes.Channels
{
[TestClass]
- public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess
+ public class ChannelSessionTest_Dispose_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess : ChannelSessionTestBase
{
- private Mock _sessionMock;
private uint _localChannelNumber;
private uint _localWindowSize;
private uint _localPacketSize;
private uint _remoteChannelNumber;
private uint _remoteWindowSize;
private uint _remotePacketSize;
+ private TimeSpan _channelCloseTimeout;
private IList _channelClosedRegister;
private List _channelExceptionRegister;
private ChannelSession _channel;
- private Mock _connectionInfoMock;
- private MockSequence _sequence;
private SemaphoreLight _sessionSemaphore;
private int _initialSessionSemaphoreCount;
- [TestInitialize]
- public void Initialize()
- {
- Arrange();
- Act();
- }
-
- private void Arrange()
+ protected override void SetupData()
{
var random = new Random();
+
_localChannelNumber = (uint) random.Next(0, int.MaxValue);
_localWindowSize = (uint) random.Next(0, int.MaxValue);
_localPacketSize = (uint) random.Next(0, int.MaxValue);
_remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
_remoteWindowSize = (uint) random.Next(0, int.MaxValue);
_remotePacketSize = (uint) random.Next(0, int.MaxValue);
+ _channelCloseTimeout = TimeSpan.FromSeconds(random.Next(10, 20));
_channelClosedRegister = new List();
_channelExceptionRegister = new List();
_initialSessionSemaphoreCount = random.Next(10, 20);
_sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+ }
- _sessionMock = new Mock(MockBehavior.Strict);
- _connectionInfoMock = new Mock(MockBehavior.Strict);
+ protected override void SetupMocks()
+ {
+ var sequence = new MockSequence();
- _sequence = new MockSequence();
- _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
- _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
- _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
- _sessionMock.InSequence(_sequence)
+ SessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(ConnectionInfoMock.Object);
+ ConnectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+ SessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+ SessionMock.InSequence(sequence)
.Setup(
p =>
p.SendMessage(
@@ -64,12 +58,12 @@ namespace Renci.SshNet.Tests.Classes.Channels
m.LocalChannelNumber == _localChannelNumber &&
m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
m.Info is SessionChannelOpenInfo)));
- _sessionMock.InSequence(_sequence)
+ SessionMock.InSequence(sequence)
.Setup(p => p.WaitOnHandle(It.IsNotNull