Commit Graph

1256 Commits

Author SHA1 Message Date
drieseng 211b5de5ec Merge branch 'develop' of https://github.com/sshnet/SSH.NET into develop 2020-03-15 15:56:18 +01:00
drieseng c0da2c14fb Make key exchange more efficient by using byte[] in our internal structures, and convert to BigInteger when necessary.
Fixes #643.

Introduce base classes for DiffieHelman group key exchange.
Eliminate code duplication.
2020-03-15 15:56:09 +01:00
drieseng 93f092ce2c Split build into modern and classic targets to allow building both "flavors" on separate machines.
This is done since I only have a VM for building the "classic" projects, and I build the "modern" projects on my main development box.
Use tokens for replacing the version and copyright in the nuspec.
2020-03-06 22:19:20 +01:00
drieseng c2e929d601 Use multi-TFM output directory for .NET Framework 4.0. 2020-03-06 22:09:50 +01:00
Gert Driesen bc59db5ff4 Avoid autolink 2020-03-06 19:57:26 +01:00
Gert Driesen facdf115c3 Formatting. 2020-02-29 17:38:04 +01:00
Gert Driesen a8b8bb95ec Sync legacy project files. 2020-02-29 17:37:43 +01:00
Gert Driesen ce4cee254c Remove obsolete and SDK-style projects from solution. 2020-02-29 17:25:07 +01:00
Gert Driesen a5f0933ab0 Remove obsolete extension methods. 2020-02-29 17:24:24 +01:00
Gert Driesen 19708c9daa Fix CLS compliance warnings. 2020-02-29 17:23:51 +01:00
drieseng c9d6ca4b33 Remove unused code. 2020-02-29 17:19:55 +01:00
drieseng 1f325586eb Remove unused code. 2020-02-29 17:17:32 +01:00
Gert Driesen 5c2e2b4c4a Use SDK-style project where possible (#629)
* Change Renci.SshNet project into SDK-style project supporting .NET 3.5, .NET 4.0; .NET Standard 1.3, .NET Standard 2.0.
* Remove .NET 3.5 project.
* Remove .NET 3.5 test project.
* Refactor away .NET 3.5 and .NET 4.0 specific source files.
* Remove .NET Core project.
* Add VS 2019 solution.
* Use VS 2019 image and solution file in AppVeyor.
* Run tests against multi-target framework test project.
* No need to shutdown socket when client disconnects.
2020-02-28 21:46:39 +01:00
Gert Driesen 5d23ed43d7 Merge pull request #632 from AdiuTankT72/develop
Fixed few summary comment tags
2020-02-27 12:55:18 +01:00
Adrian Stanislawski ea5a440131 Fixed few summary comment tags 2020-02-27 11:36:39 +01:00
Gert Driesen e9e9b4e463 Update ScpClient to work with revent versions of OpenSSH (#625)
Update ScpClient to work with versions of OpenSSH that include fix for CVE-2018-20685.
2020-02-15 21:06:10 +01:00
Gert Driesen 546e2b9ece Merge pull request #496 from darinkes/elliptic
Elliptic Curves
2020-01-11 21:16:33 +01:00
drieseng 982ef10ae7 Update readme for the new key exchange methods, host key algorithms and private key formats. 2020-01-11 17:05:32 +01:00
Stefan Rinkes 7d7365156e Enable Build of Elliptic-Curves for other Projects 2018-12-09 16:41:40 +01:00
Stefan Rinkes c9f9e3ca35 Support for Ed25519 Host- and Private-Keys 2018-12-09 16:41:35 +01:00
Stefan Rinkes 90fb62b7cc Add Support for ECDSA Host- and Private-Keys
Also known as:
- ecdsa-sha2-nistp256
- ecdsa-sha2-nistp384
- ecdsa-sha2-nistp521

Basically it translate between SSH-Data and Microsoft Crypto API.
2018-12-09 13:00:10 +01:00
Stefan Rinkes b58a11c0da KEX with Elliptic Curve curve25519
Add Kex Algos curve25519-sha256(@libssh.org)
2018-12-09 13:00:10 +01:00
Stefan Rinkes 465451985a KEX with Elliptic Curves ecdh-sha2-nistp{256,384,521}
Add Kex Algos ecdh-sha2-nistp{256,384,521}

We have to use a minimalistic BouncyCastle Import for ECDH, since Microsoft's
System.Security.Cryptography is not usable in this case.

ECDiffieHellmanCng.DeriveKeyMaterial() already does the hashing and it's not
possible to get the unhased key material for further processing.

https://blogs.msdn.microsoft.com/shawnfa/2007/01/22/elliptic-curve-diffie-hellman/
2018-12-09 13:00:10 +01:00
Stefan Rinkes 2fe968ba7c Import Chaos.NaCl for ED25519 and Curve25519 2018-12-09 13:00:09 +01:00
Stefan Rinkes d24fe2006f Import minimalistic BouncyCastle for ECDH
With some rewrites to avoid import of unneeded features.
2018-12-09 13:00:05 +01:00
Gert Driesen bd01d97179 Use pack consistently.
Formatting.
2018-07-30 21:58:04 +02:00
Gert Driesen 07e142c1b1 SOCK4: search all host addresses for the first IPv4 address. 2018-07-30 21:57:14 +02:00
Gert Driesen cfd412529e Use switch instead of if/elseif. 2018-07-30 21:34:59 +02:00
Gert Driesen adeeb8c231 Minor refactoring of our SOCKS client support.
Use big endian format for port number. Fixes #447.
2018-07-29 22:15:48 +02:00
Gert Driesen 7b43bdcce9 Added Read(Socket socket, int size, TimeSpan timeout) method. 2018-07-29 21:50:48 +02:00
Gert Driesen 4f5aaec882 Remove unused fields. 2018-07-29 21:46:55 +02:00
Gert Driesen 198162d193 Use Pack.BigEndianToUInt16. 2018-07-29 21:46:35 +02:00
Gert Driesen 043b78bac9 Simplify names in crefs. 2018-07-28 22:15:13 +02:00
Gert Driesen 13bef36d38 Minor code cleanup. 2018-07-22 21:15:29 +02:00
Gert Driesen cbefe876dd Remove duplicate base class. 2018-07-22 21:15:03 +02:00
Gert Driesen 031f0a164b Fix name of argument in ArgumentOutOfRangeException thrown in OperationTimeout.
Added tests for OperationTimeout.
2018-07-22 21:14:32 +02:00
Gert Driesen 660b075c79 Added more tests for issue #338. 2018-07-22 21:12:32 +02:00
Gert Driesen 7932ba7618 Remove unused imports. 2018-07-21 12:56:56 +02:00
Gert Driesen 6a017aef73 Minor code style & naming changes. 2018-07-21 12:56:22 +02:00
Gert Driesen e75ab4a23c Added Decrypt test. 2018-07-21 12:43:19 +02:00
Gert Driesen de06f4555e Fix flaky test. 2018-07-21 12:31:17 +02:00
Gert Driesen 5941626615 Document TryWait overloads, and WaitResult enumeration. 2018-07-21 10:39:52 +02:00
Gert Driesen 6183f6d608 Add IUTF8 terminal mode. 2018-07-21 10:38:53 +02:00
Gert Driesen 7691cb0b55 Avoid leaking event subscriptions when an exception is thrown during initialization of ShellStream.
Handle error situations when initializing ShellStream.
2017-11-27 22:24:55 +01:00
Gert Driesen 69882b39f9 Remove unused import. 2017-11-27 22:20:19 +01:00
Gert Driesen 3e304ea7e7 * Add TryWait overloads to (I)Session that return the result of the wait instead of throwing an exception.
* Introduce a ChannelCloseTimeout property on ConnectionInfo that allows you to control how long you want to wait for the server to send a SSH_MSG_CHANNEL_CLOSE. The default value is 1 second.
* Use the newly introduced TryWait on Session with ChannelCloseTimeout as timeout in Channel to avoid throwing an exception when the server does not send a SSH_MSG_CHANNEL_CLOSE.
  Fixes #335.
* Removed unused WaitHandle from Channel.
2017-11-27 22:20:05 +01:00
Gert Driesen 66471e6741 When the request to open a subsystem fails, close the channel session and throw a SshException.
Fixes #308.
2017-11-15 21:50:49 +01:00
Gert Driesen 7cecd861f3 Merge branch 'develop' of https://github.com/sshnet/SSH.NET into develop 2017-11-11 19:47:08 +01:00
Gert Driesen 8141113259 Only keep reference to session if the connection was established successfully.
Fixes issue #338.
2017-11-11 19:20:03 +01:00
Gert Driesen 43047b11b5 Merge pull request #333 from sshnet/netstandard20
Add support for .NET Standard 2.0
2017-11-05 15:33:16 +01:00