Commit Graph

662 Commits

Author SHA1 Message Date
Wojciech Nagórski 7cd0487785 ListDirectoryAsync return IAsyncEnumerable (#1126)
* ListDirectoryAsync return IAsyncEnumerable

* Fix documentation

* Update README.md

* Fix

* Add Sftp ListDirectoryAsync test

* Revert

* Integration tests for ListDirectoryAsync with IAsyncEnumerable
2023-08-30 10:22:10 +02:00
Wojciech Nagórski 82dc77a2f8 Use correct SSH.NET 2023-08-30 06:10:28 +02:00
Wojciech Nagórski 77b27e570d Merge branch 'master' of https://github.com/sshnet/SSH.NET into integration-tests-mstests 2023-08-26 05:56:15 +02:00
Wojciech Nagórski 6f567ec7bb Remove todos 2023-06-29 06:31:15 +02:00
Wojciech Nagórski 69a42d3b70 Integration tests 2023-06-29 06:29:17 +02:00
Rob Hague 457789947c Replace IsNullOrWhiteSpace extension (#1142) 2023-06-12 23:21:25 +02:00
Rob Hague a4dbf7763a Replace Array<T>.Empty with Array.Empty<T>() (#1137) 2023-06-06 23:09:12 +02:00
Gert Driesen 27976bb927 Analyzer fixes round 3. (#1135) 2023-05-31 09:52:52 +02:00
Gert Driesen c04cdbcb97 Round 2 of analyzer fixes and general cleanup. (#1132) 2023-05-29 17:16:08 +02:00
Gert Driesen 3ecbd1071d Fix some (lots of) issues reported by analyzers. (#1125)
Fix some (lots of) issues reported by analyzers.
2023-05-24 20:37:46 +02:00
Wojciech Nagórski 072ba7e013 Remove FEATURE_DIRECTORYINFO_ENUMERATEFILES (#1119)
* Remove FEATURE_DIRECTORYINFO_ENUMERATEFILES
* Add exception documentation
2023-05-22 09:47:09 +02:00
Wojciech Nagórski 8c932fb1e8 Remove old features [Part 1] (#1117)
Remove obsolete feature switches (now that we've remove support for legacy target frameworks) and remove corresponding conditional code.
2023-05-09 21:21:13 +02:00
Wojciech Nagórski cf8510013d Removing old target frameworks (#1109)
Remove support for legacy / deprecated target frameworks while adding support for .NET 6.0 (and higher).
The supported target frameworks are now:
* .NETFramework 4.6.2 (and higher)
* .NET Standard 2.0
* .NET 6.0 (and higher)
2023-05-06 22:32:10 +02:00
LemonPi314 f3ebc290e2 Fix Seek Operations in SftpFileStream (#910)
* Fix offset operations in SftpFileStream.Seek
* Fix seek exception message and add default case for invalid seek origin
* Use named params when throwing ArgumentException
* Add tests for seeking from end of file
2022-11-29 21:33:47 +01:00
Masuri b9bc4750ab fix typo (#999) 2022-08-26 20:54:30 +02:00
Owen Krueger 34ce2bd1d0 Add IBaseClient for BaseClient and ISftpClient to inherit from (#975)
Add IBaseClient for BaseClient and ISftpClient to inherit from
2022-07-03 21:11:46 +02:00
drieseng bd7c02f6e4 Remove unused import. 2022-05-29 17:00:12 +02:00
drieseng 4cdedf6524 Use cryptographically secure random number generator.
Fixes CVE-2022-29245.
2022-05-29 16:59:38 +02:00
drieseng c728fba850 Merge branch 'develop' of https://github.com/sshnet/SSH.NET into develop 2022-05-29 16:58:22 +02:00
drieseng 03c6d60736 Use cryptographically secure random number generator.
Fixes CVE-2022-29245.
2022-05-29 16:58:07 +02:00
Stefan Rinkes bc99ada7da Agent auth and Keygen (#794)
* Allow to set PrivateKeyFile Key directly
   So you can add your own Key-Classes to SSH.NET
* Add ED25519 ctor for just pub key part.
* Make ECDSA Key Bits accessible
   You cant export imported CngKeys. To be able to export them to agent or Key-Files make the private bits also accessible.
* Better NETFRAMEWORK vs NETSTANDARD handling
* Add Comment Property to Key
* Add IPrivateKeySource
  So Extension can add own PrivateKeyFiles, e.g. PuttyKeyFile.
2022-03-05 17:05:02 +01:00
Igor Milavec 4dfc126ace Add unit tests for task-based asynchronous API (#906)
* Fix runtime and culture dependant tests.
* Set C# 7.3 in Tests.csproj to limit intellisense's suggestions under different targets
* Add SftpClientTest.*Async
* Add SftpFileStreamTest_OpenAsync_*
* Add SftpFileStreamTest_WriteAsync_*
* Add SftpFileStreamTest_ReadAsync_*
* Align AppVeyor script with Test project target frameworks
2022-02-15 20:46:34 +01:00
Pedro Fonseca 37fb864663 Fix virus false-positive by Defender on Renci.SSHNet.Tests.dll (#867)
Co-authored-by: Pedro Fonseca <pfonseca@qti.qualcomm.com>
2022-02-14 20:27:52 +01:00
Igor Milavec 7bdfc9e615 Add async support to SftpClient and SftpFileStream (#819)
* Add FEATURE_TAP and net472 target
* Add TAP async support to SftpClient and SftpFileStream
* Add async support to DnsAbstraction and SocketAbstraction
* Add async support to *Connector and refactor the hierarchy
* Add ConnectAsync to BaseClient
2021-12-14 21:58:10 +01:00
Igor Milavec 30d79c7b31 Start MessageListener with ThreadAbstraction.ExecuteThreadLongRunning (#902)
* Fix Thread pool exhaustion due to MessageListener running on ThreadPool
* Mark long running thread as background
2021-11-28 15:42:04 +01:00
wxtsxt 583a9cea6a Add interface to SftpFile #120 (#812)
* Create ISftpFile interface. SftpFile sealed. Return ISftpFile from SftpClient instead of SftpFile. Make ISftpClient interface disposable.

Co-authored-by: Wojciech Swieboda <wswieboda@chathamfinancial.com>
2021-09-08 18:26:56 +02:00
Stefan Rinkes f072c5f1a1 OPENSSH KeyReader for more keys (#614)
* OPENSSH KeyReader for more keys

Add support to parse OpenSSH Keys with ECDSA 256/384/521 and RSA.

https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key

Change-Id: Iaa9cce0f2522e5fee377a82cb252f81f0b7cc563

* Fix ED25519Key KeyLength

* Fix ED25519 PubKey-auth

LeadingZeros of BigInteger-Conversion have to be removed
before sending the Key.
2021-04-18 18:49:01 +02:00
drieseng acda1431d2 Prepare for 2020.0.1 release 2021-01-24 14:40:24 +01:00
drieseng a06522c3d6 Merge branch 'develop' 2021-01-24 14:38:33 +01:00
drieseng 91b64585bc Support LF as line ending for banner and identification string
Fixes #761
2021-01-12 19:31:25 +01:00
drieseng f48093713f Merge branch 'develop' 2020-12-31 14:02:11 +01:00
drieseng a620835c69 Support our legacy target frameworks. 2020-12-31 14:01:35 +01:00
drieseng 853ec99609 Prepare for 2020.0.0 release. 2020-12-31 13:06:47 +01:00
drieseng 8737fdb386 Merge branch 'develop' 2020-12-31 11:47:24 +01:00
drieseng 008556205b Allow for a small marging when verifying whether configured timeout was respected. 2020-12-31 11:37:18 +01:00
drieseng 84b9281149 Merge branch 'develop' 2020-12-30 22:28:44 +01:00
drieseng 41e378cfc0 Fix test. 2020-12-30 22:12:54 +01:00
drieseng 767fafbfc1 Improve exception messages further. 2020-12-30 21:19:30 +01:00
drieseng f60f24fb9c Fix more tests to pass on .NET Core. 2020-12-30 16:06:24 +01:00
drieseng a5148aea1a Fix some test failures on .NET Core. 2020-12-30 15:13:57 +01:00
drieseng d5fefcc369 Fix and rename test. 2020-12-30 13:13:20 +01:00
drieseng e8db68c371 Improve exception messages. 2020-12-30 11:44:25 +01:00
drieseng 8d485f918b Remove unused import. 2020-12-30 11:43:35 +01:00
drieseng f09496b782 Fix remaining test failure. 2020-12-29 20:22:10 +01:00
drieseng 43f18cb3d4 Fix test failures. 2020-12-29 20:13:19 +01:00
drieseng 60be75d85c Complete refactoring of connection process, and greatly improve test coverage. 2020-12-29 20:01:28 +01:00
drieseng e0b32a41ea Add Connect overload that takes existing Socket instance. 2020-12-29 19:53:46 +01:00
drieseng de06f12350 Allow for easier troubleshooting of protocol version exchange.
Fixes #751.
2020-12-29 18:56:26 +01:00
drieseng eefcd8fbc5 Fix test failure. 2020-12-27 12:16:49 +01:00
drieseng fbadaf8b74 Fix handling of empty line. 2020-12-27 12:06:36 +01:00