* Data lengths longer than stream position when data lengths are greater than int.maxvalue are ignored and do not throw an exception
* Removed unreachable test
* Do not try to load the data (just ignore it)
---------
Co-authored-by: Steve Evans <sevans1@oeconnection.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
* Fix https://github.com/sshnet/SSH.NET/issues/1191
* Expose `SshIdentificationReceived` event so that lib consumer can adjust based on server identification
* revert unrelated code style change
* revert OpenSSH 6.6 related tests
* revert ConnectionBase
* Add unit tests
* Rename to `ServerIdentificationReceived`
* rename
* Use System.Security.Cryptography in AesCipher
* don't set the IV - it is unused by ECB
* Dispose ciphers in Session if applicable
---------
Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
* Make it work (it needs the TRACE symbol defined - lots of head scratching without it)
* Expose publicly, but still in DEBUG (to allow programmatic configuration necessary in Core)
* Document how to use it
* Tweak usage (add some logs, remove key/iv information, override ToString on some Message types)
Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
Change the data to be in 64-wide columns instead of 70, and add a newline
at the end of the file. ssh-keygen does not like it otherwise.
puttygen Key.OPENSSH.ECDSA.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ECDSA.Encrypted
puttygen Key.OPENSSH.ECDSA.txt -O private-openssh-new -C Key.OPENSSH.ECDSA
puttygen Key.OPENSSH.ECDSA384.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ECDSA384.Encrypted
puttygen Key.OPENSSH.ECDSA384.txt -O private-openssh-new -C Key.OPENSSH.ECDSA384
puttygen Key.OPENSSH.ECDSA521.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ECDSA521.Encrypted
puttygen Key.OPENSSH.ECDSA521.txt -O private-openssh-new -C Key.OPENSSH.ECDSA521
puttygen Key.OPENSSH.ED25519.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ED25519.Encrypted
puttygen Key.OPENSSH.ED25519.txt -O private-openssh-new -C Key.OPENSSH.ED25519
puttygen Key.OPENSSH.RSA.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.RSA.Encrypted
puttygen Key.OPENSSH.RSA.txt -O private-openssh-new -C Key.OPENSSH.RSA
(the -C flag changes the comment, otherwise puttygen refuses to do anything)
* Increase test coverage for AesCipher
The tests were generated by a script which is also added for posterity.
The script works by running "openssl enc [...]" (via WSL) to generate the
expected encrypted values, and also verifies those values against the .NET
BCL implementation as an extra validation (it uncovered a difference in
CFB mode between the two relating to the feedback size).
* Fix OfbCipherMode
It was an exact copy of CfbCipherMode
* Fix analyzer errors in Renci.SshNet and Renci.SshNet.TestTools.OpenSSH.
Suppress all errors in unit tests and integration tests.
* Update unit tests now that we pass 'mode' as argument name when we throw ArgumentException.
* Remove stale comment and add unit tests for SshData.ReadBytes(int length).
* Remove unnessary suppression.
* Remove Visual Studio magic.
* Removed duplicate source file.
* Clarified that suppression hides a false positive.
* Remove suppressions for S2372.
* Update ReadExtensionPair() to return concrete dictionary.
* Move test projects to test folder.
Move global.json to root of repo.
Update solution items in solution.
* Move test projects to test folder.
Move global.json to root of repo.
Update solution items in solution.
Update appveyor configuration/
* Attempt to have appveyor use the correct .NET SDK.
* Update .NET SDK to version 7.0.402.
* Move Data folder below Renci.SshNet.Tests.
* Make csinst less chatty.
* Move Data folder directly below test folder as it's used by multiple test projects.
* Remove CS1591 nowarn from concrete test projects as this is already defined in the Directory.Build.props that is in the test folder.
* Fix integration test after moving test projects
---------
Co-authored-by: drieseng <gert.driesen@telenet.be>
* Merging fix from @clivetong into our own SSH.NET fork
- The following article describes some of the issues with the double check lock that we have seen issues with: https://www.sudhanshutheone.com/posts/double-check-lock-csharp
* Merging fix from @clivetong into our own SSH.NET fork
- The following article describes some of the issues with the double check lock that we have seen issues with: https://www.sudhanshutheone.com/posts/double-check-lock-csharp
* Update Channel to fix AppVeyor failure (field should be readonly)
SocketErrorCode is OS agnostic, ErrorCode is OS specific.
On Windows ErrorCode = (int) SocketErrorCode, but on Mac and Unix it is not.
For example ExitCode for HostNotFound (11001) on Windows is 11001, on Mac & Unix is -131073. So testing for ExitCode == 11001 fails on Mac & Unix.
Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
* Use ExceptionDispatchInfo to retain call stack in Session.WaitOnHandle()
* merge
* Update src/Renci.SshNet/Session.cs
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
---------
Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
* Renci.SshNet.IntegrationTests
* Renci.SshNet.TestTools.OpenSSH
* Move integration tests to main repo
* Move old tests to new integration tests
* Move old integration tests to new integration tests
* Move more tests
* Move authentication tests
* Move SshClientTests
* Fix some tests
* Remove duplicated test
* Poc of ProcessDisruptor
* Rename
* Some fixes
* Remove performance tests
* Small improvements