Camelotia
Camelotia copied to clipboard
chore(deps): update dependency ssh.net to v2024
trafficstars
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| ssh.net | 2020.0.2 -> 2024.1.0 |
Release Notes
sshnet/SSH.NET (ssh.net)
v2024.1.0
New features:
- Add support for
aes*[email protected]cipher algorithms on .NET 6+ - Add cancellation of
SshCommandvia signals - Add
SshCommand.ExecuteAsync - Add support for
[email protected]compression algorithm on .NET 6+
Breaking changes:
SshCommand.ExitStatuswas changed in #1423 from returningintto returningint?to reflect the fact that an exit status may not always be returned.PipeStream(which provides the implementation ofSshCommand.OutputStreamandExtendedOutputStream) was rewritten in #1399 to fix a number of bugs and become more "stream-like". As such:- It may now block where previously it may have returned 0 prematurely
- It may now return partial data where previously it may have blocked until a certain amount of data was available.
- The properties
BlockLastReadBufferandMaxBufferLengthhave been removed.
CommandAsyncResultwas deleted in #1426RsaCipher,AsymmetricCipherandCipherDigitalSignaturewere deleted in #1373Encrypt/DecryptBlockwere moved down fromSymmetricCiphertoBlockCipherin #1369- The previously nonfunctional
ZlibStreamwas deleted and the API ofCompressorwas changed in #1326 SftpFileSytemInformationwas renamed toSftpFileSystemInformationin #1425- See the full API diff at the end
What's Changed
- Fix ShellStream when receiving data larger than buffer length by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1337
- fix link to tests in README by @mus65 in https://github.com/sshnet/SSH.NET/pull/1338
- Remove feature binary serialization by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1325
- Changed Private Key Regex to be more tolerant regarding new lines at end of key file by @staecthSICKAG in https://github.com/sshnet/SSH.NET/pull/1344
- Use latest .NET 8 SDK in Ubuntu build by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1352
- Use BCL Timeout by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1353
- Fix CancelAsync Cause Deadlock by @zeotuan in https://github.com/sshnet/SSH.NET/pull/1345
- Cleanup and muting of analyzer warnings by @jscarle in https://github.com/sshnet/SSH.NET/pull/1357
- SftpClient: handle the SFTP session being closed by the server by @mus65 in https://github.com/sshnet/SSH.NET/pull/1362
- Handle unknown channel messages correctly by @mus65 in https://github.com/sshnet/SSH.NET/pull/1363
- Remove enormous array allocations in tests causing instability in CI by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1367
- Add Rob-Hague to CODEOWNERS by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1376
- enable nullable on BaseClient and SftpClient by @mus65 in https://github.com/sshnet/SSH.NET/pull/1339
- Added support for GitHub pages using docfx by @jscarle in https://github.com/sshnet/SSH.NET/pull/1358
- Add support for Zlib compression (.NET 6.0 onward only) by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1326
- git: checkout cs files with crlf by @mus65 in https://github.com/sshnet/SSH.NET/pull/1372
- Fix nullable error in build by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1377
- Add support for AEAD AES 128/256 GCM Ciphers (.NET 6.0 onward only) by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1369
- Add an AOT compatibility test app by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1378
- Implement OpenSSH strict key exchange extension by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1366
- Fix potential side-channel timing attack issue by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1375
- Handle timeout correctly on Socks5 Proxy by @BoronBGP in https://github.com/sshnet/SSH.NET/pull/1342
- Fix ArgumentException usage in BlockCipher by @IgorMilavec in https://github.com/sshnet/SSH.NET/pull/818
- Fix SocketAsyncEventArgsAwaitable calling continuation multiple times by @IgorMilavec in https://github.com/sshnet/SSH.NET/pull/918
- gitattributes: set diff=csharp on cs files by @mus65 in https://github.com/sshnet/SSH.NET/pull/1393
- drop obsolete #if directives by @mus65 in https://github.com/sshnet/SSH.NET/pull/1394
- Use System.Security.Cryptography for RSA by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1373
- Tweak AsyncSocketListener in tests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1382
- Documentation updates by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1395
- Cleanup formatting and style and enforce it in CI by @mus65 in https://github.com/sshnet/SSH.NET/pull/1380
- fix flaky Connectivity Tests by @mus65 in https://github.com/sshnet/SSH.NET/pull/1403
- fix flaky ReceiveOnServerSocketShouldReturnZero test by @mus65 in https://github.com/sshnet/SSH.NET/pull/1404
- fix flaky Sftp_BeginUploadFile test by @mus65 in https://github.com/sshnet/SSH.NET/pull/1402
- More AsyncSocketListener patchwork by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1408
- use Regex Source Generator for .NET 7+ by @mus65 in https://github.com/sshnet/SSH.NET/pull/1401
- Enable nullable on NetConf/Scp/SshClient by @mus65 in https://github.com/sshnet/SSH.NET/pull/1392
- make ConnectShouldActivateKeepAliveIfSessionIs test less flaky by @mus65 in https://github.com/sshnet/SSH.NET/pull/1410
- Delete CountdownEventTests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1409
- dotnet pack in CI by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1400
- Relax the RSA/DSA decision for SSH2 keys by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1190
- Fix a few issues with PipeStream by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1399
- fix flaky SFTP file time tests by @mus65 in https://github.com/sshnet/SSH.NET/pull/1414
- doc: Update examples.md by @lupaulus in https://github.com/sshnet/SSH.NET/pull/1421
- A couple of changes/fixes in SshCommand by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1423
- Rename SftpFileSytemInformation to SftpFileSystemInformation by @fndejan in https://github.com/sshnet/SSH.NET/pull/1425
- Support creating Shell(Stream) without PTY by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1419
- fix build with .NET 9.0 SDK by @mus65 in https://github.com/sshnet/SSH.NET/pull/1427
- Updated NETCONF framing protocol detection to check both client & server capabilities by @declspec in https://github.com/sshnet/SSH.NET/pull/639
- Fix netconf framing protocol by @schaveyt in https://github.com/sshnet/SSH.NET/pull/946
- On SOCKS5 proxy: set hostname, not always IP by @jjvaca in https://github.com/sshnet/SSH.NET/pull/1072
- Remove unnecessary DNS lookup in Connect by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1412
- Add SshCommand.ExecuteAsync by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1426
- Set version to 2024.1.0 by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1429
New Contributors
- @staecthSICKAG made their first contribution in https://github.com/sshnet/SSH.NET/pull/1344
- @zeotuan made their first contribution in https://github.com/sshnet/SSH.NET/pull/1345
- @BoronBGP made their first contribution in https://github.com/sshnet/SSH.NET/pull/1342
- @lupaulus made their first contribution in https://github.com/sshnet/SSH.NET/pull/1421
- @fndejan made their first contribution in https://github.com/sshnet/SSH.NET/pull/1425
- @declspec made their first contribution in https://github.com/sshnet/SSH.NET/pull/639
- @schaveyt made their first contribution in https://github.com/sshnet/SSH.NET/pull/946
- @jjvaca made their first contribution in https://github.com/sshnet/SSH.NET/pull/1072
Full Changelog: https://github.com/sshnet/SSH.NET/compare/2024.0.0...2024.1.0
API diff
namespace Renci.SshNet
{
public abstract class BaseClient : Renci.SshNet.IBaseClient, System.IDisposable
{
- public bool IsConnected { get; }
+ public virtual bool IsConnected { get; }
- public event System.EventHandler<Renci.SshNet.Common.ExceptionEventArgs> ErrorOccurred;
+ public event System.EventHandler<Renci.SshNet.Common.ExceptionEventArgs>? ErrorOccurred;
- public event System.EventHandler<Renci.SshNet.Common.HostKeyEventArgs> HostKeyReceived;
+ public event System.EventHandler<Renci.SshNet.Common.HostKeyEventArgs>? HostKeyReceived;
- public event System.EventHandler<Renci.SshNet.Common.SshIdentificationEventArgs> ServerIdentificationReceived;
+ public event System.EventHandler<Renci.SshNet.Common.SshIdentificationEventArgs>? ServerIdentificationReceived;
}
public class CipherInfo
{
- public CipherInfo(int keySize, System.Func<byte[], byte[], Renci.SshNet.Security.Cryptography.Cipher> cipher) { }
+ public CipherInfo(int keySize, System.Func<byte[], byte[], Renci.SshNet.Security.Cryptography.Cipher> cipher, bool isAead = false) { }
+ public bool IsAead { get; }
}
- public class CommandAsyncResult : System.IAsyncResult
- {
- public object AsyncState { get; }
- public System.Threading.WaitHandle AsyncWaitHandle { get; }
- public int BytesReceived { get; set; }
- public int BytesSent { get; set; }
- public bool CompletedSynchronously { get; }
- public bool IsCompleted { get; }
- }
public interface ISftpClient : Renci.SshNet.IBaseClient, System.IDisposable
{
- System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback asyncCallback);
+ System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback? asyncCallback);
- System.IAsyncResult BeginListDirectory(string path, System.AsyncCallback asyncCallback, object state, System.Action<int> listCallback = null);
+ System.IAsyncResult BeginListDirectory(string path, System.AsyncCallback? asyncCallback, object? state, System.Action<int>? listCallback = null);
- System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback asyncCallback, object state, System.Action<ulong> downloadCallback = null);
+ System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback? asyncCallback, object? state, System.Action<ulong>? downloadCallback = null);
- System.IAsyncResult BeginSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, System.AsyncCallback asyncCallback, object state);
+ System.IAsyncResult BeginSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, System.AsyncCallback? asyncCallback, object? state);
- System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback asyncCallback);
+ System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback? asyncCallback);
- System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback asyncCallback, object state, System.Action<ulong> uploadCallback = null);
+ System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback? asyncCallback, object? state, System.Action<ulong>? uploadCallback = null);
- System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, bool canOverride, System.AsyncCallback asyncCallback, object state, System.Action<ulong> uploadCallback = null);
+ System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, bool canOverride, System.AsyncCallback? asyncCallback, object? state, System.Action<ulong>? uploadCallback = null);
- void DownloadFile(string path, System.IO.Stream output, System.Action<ulong> downloadCallback = null);
+ void DownloadFile(string path, System.IO.Stream output, System.Action<ulong>? downloadCallback = null);
- Renci.SshNet.Sftp.SftpFileSytemInformation GetStatus(string path);
+ Renci.SshNet.Sftp.SftpFileSystemInformation GetStatus(string path);
- System.Threading.Tasks.Task<Renci.SshNet.Sftp.SftpFileSytemInformation> GetStatusAsync(string path, System.Threading.CancellationToken cancellationToken);
+ System.Threading.Tasks.Task<Renci.SshNet.Sftp.SftpFileSystemInformation> GetStatusAsync(string path, System.Threading.CancellationToken cancellationToken);
- System.Collections.Generic.IEnumerable<Renci.SshNet.Sftp.ISftpFile> ListDirectory(string path, System.Action<int> listCallback = null);
+ System.Collections.Generic.IEnumerable<Renci.SshNet.Sftp.ISftpFile> ListDirectory(string path, System.Action<int>? listCallback = null);
- void UploadFile(System.IO.Stream input, string path, System.Action<ulong> uploadCallback = null);
+ void UploadFile(System.IO.Stream input, string path, System.Action<ulong>? uploadCallback = null);
- void UploadFile(System.IO.Stream input, string path, bool canOverride, System.Action<ulong> uploadCallback = null);
+ void UploadFile(System.IO.Stream input, string path, bool canOverride, System.Action<ulong>? uploadCallback = null);
}
public class ScpClient : Renci.SshNet.BaseClient
{
- public event System.EventHandler<Renci.SshNet.Common.ScpDownloadEventArgs> Downloading;
+ public event System.EventHandler<Renci.SshNet.Common.ScpDownloadEventArgs>? Downloading;
- public event System.EventHandler<Renci.SshNet.Common.ScpUploadEventArgs> Uploading;
+ public event System.EventHandler<Renci.SshNet.Common.ScpUploadEventArgs>? Uploading;
}
public class SftpClient : Renci.SshNet.BaseClient, Renci.SshNet.IBaseClient, Renci.SshNet.ISftpClient, System.IDisposable
{
+ public override bool IsConnected { get; }
- public System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback asyncCallback) { }
+ public System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback? asyncCallback) { }
- public System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback asyncCallback, object state, System.Action<ulong> downloadCallback = null) { }
+ public System.IAsyncResult BeginDownloadFile(string path, System.IO.Stream output, System.AsyncCallback? asyncCallback, object? state, System.Action<ulong>? downloadCallback = null) { }
- public System.IAsyncResult BeginListDirectory(string path, System.AsyncCallback asyncCallback, object state, System.Action<int> listCallback = null) { }
+ public System.IAsyncResult BeginListDirectory(string path, System.AsyncCallback? asyncCallback, object? state, System.Action<int>? listCallback = null) { }
- public System.IAsyncResult BeginSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, System.AsyncCallback asyncCallback, object state) { }
+ public System.IAsyncResult BeginSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, System.AsyncCallback? asyncCallback, object? state) { }
- public System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback asyncCallback) { }
+ public System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback? asyncCallback) { }
- public System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback asyncCallback, object state, System.Action<ulong> uploadCallback = null) { }
+ public System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, System.AsyncCallback? asyncCallback, object? state, System.Action<ulong>? uploadCallback = null) { }
- public System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, bool canOverride, System.AsyncCallback asyncCallback, object state, System.Action<ulong> uploadCallback = null) { }
+ public System.IAsyncResult BeginUploadFile(System.IO.Stream input, string path, bool canOverride, System.AsyncCallback? asyncCallback, object? state, System.Action<ulong>? uploadCallback = null) { }
- public void DownloadFile(string path, System.IO.Stream output, System.Action<ulong> downloadCallback = null) { }
+ public void DownloadFile(string path, System.IO.Stream output, System.Action<ulong>? downloadCallback = null) { }
- public Renci.SshNet.Sftp.SftpFileSytemInformation GetStatus(string path) { }
+ public Renci.SshNet.Sftp.SftpFileSystemInformation GetStatus(string path) { }
- public System.Threading.Tasks.Task<Renci.SshNet.Sftp.SftpFileSytemInformation> GetStatusAsync(string path, System.Threading.CancellationToken cancellationToken) { }
+ public System.Threading.Tasks.Task<Renci.SshNet.Sftp.SftpFileSystemInformation> GetStatusAsync(string path, System.Threading.CancellationToken cancellationToken) { }
- public System.Collections.Generic.IEnumerable<Renci.SshNet.Sftp.ISftpFile> ListDirectory(string path, System.Action<int> listCallback = null) { }
+ public System.Collections.Generic.IEnumerable<Renci.SshNet.Sftp.ISftpFile> ListDirectory(string path, System.Action<int>? listCallback = null) { }
- public void UploadFile(System.IO.Stream input, string path, System.Action<ulong> uploadCallback = null) { }
+ public void UploadFile(System.IO.Stream input, string path, System.Action<ulong>? uploadCallback = null) { }
- public void UploadFile(System.IO.Stream input, string path, bool canOverride, System.Action<ulong> uploadCallback = null) { }
+ public void UploadFile(System.IO.Stream input, string path, bool canOverride, System.Action<ulong>? uploadCallback = null) { }
}
public class SshClient : Renci.SshNet.BaseClient
{
- public Renci.SshNet.Shell CreateShell(System.IO.Stream input, System.IO.Stream output, System.IO.Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, System.Collections.Generic.IDictionary<Renci.SshNet.Common.TerminalModes, uint> terminalModes, int bufferSize) { }
+ public Renci.SshNet.Shell CreateShell(System.IO.Stream input, System.IO.Stream output, System.IO.Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, System.Collections.Generic.IDictionary<Renci.SshNet.Common.TerminalModes, uint>? terminalModes, int bufferSize) { }
- public Renci.SshNet.Shell CreateShell(System.Text.Encoding encoding, string input, System.IO.Stream output, System.IO.Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, System.Collections.Generic.IDictionary<Renci.SshNet.Common.TerminalModes, uint> terminalModes, int bufferSize) { }
+ public Renci.SshNet.Shell CreateShell(System.Text.Encoding encoding, string input, System.IO.Stream output, System.IO.Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, System.Collections.Generic.IDictionary<Renci.SshNet.Common.TerminalModes, uint>? terminalModes, int bufferSize) { }
+ public Renci.SshNet.Shell CreateShellNoTerminal(System.IO.Stream input, System.IO.Stream output, System.IO.Stream extendedOutput, int bufferSize = -1) { }
- public Renci.SshNet.ShellStream CreateShellStream(string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize, System.Collections.Generic.IDictionary<Renci.SshNet.Common.TerminalModes, uint> terminalModeValues) { }
+ public Renci.SshNet.ShellStream CreateShellStream(string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize, System.Collections.Generic.IDictionary<Renci.SshNet.Common.TerminalModes, uint>? terminalModeValues) { }
+ public Renci.SshNet.ShellStream CreateShellStreamNoTerminal(int bufferSize = -1) { }
}
public class SshCommand : System.IDisposable
{
- public int ExitStatus { get; }
+ public int? ExitStatus { get; }
+ public string? ExitSignal { get; }
- public System.IAsyncResult BeginExecute(System.AsyncCallback callback) { }
+ public System.IAsyncResult BeginExecute(System.AsyncCallback? callback) { }
- public System.IAsyncResult BeginExecute(System.AsyncCallback callback, object state) { }
+ public System.IAsyncResult BeginExecute(System.AsyncCallback? callback, object? state) { }
- public System.IAsyncResult BeginExecute(string commandText, System.AsyncCallback callback, object state) { }
+ public System.IAsyncResult BeginExecute(string commandText, System.AsyncCallback? callback, object? state) { }
- public void CancelAsync() { }
+ public void CancelAsync(bool forceKill = false, int millisecondsTimeout = 500) { }
- protected override void Finalize() { }
+ public System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken = default) { }
}
}
namespace Renci.SshNet.Common
{
public class PipeStream : System.IO.Stream
{
- public bool BlockLastReadBuffer { get; set; }
- public long MaxBufferLength { get; set; }
}
}
namespace Renci.SshNet.Compression
{
- public enum CompressionMode
- {
- Compress = 0,
- Decompress = 1,
- }
public abstract class Compressor : Renci.SshNet.Security.Algorithm, System.IDisposable
{
- protected Compressor() { }
- protected bool IsActive { get; set; }
+ protected Compressor(bool delayedCompression) { }
+ public byte[] Compress(byte[] data) { }
- protected Renci.SshNet.Session Session { get; }
- public virtual byte[] Compress(byte[] data) { }
- public virtual byte[] Decompress(byte[] data) { }
+ protected abstract byte[] CompressCore(byte[] data, int offset, int length);
+ public byte[] Decompress(byte[] data) { }
+ protected abstract byte[] DecompressCore(byte[] data, int offset, int length);
}
- public class ZlibOpenSsh : Renci.SshNet.Compression.Compressor
- {
- public ZlibOpenSsh() { }
- public override string Name { get; }
- public override void Init(Renci.SshNet.Session session) { }
- }
}
namespace Renci.SshNet.Connection
{
- public class ZlibStream
- {
- public ZlibStream(System.IO.Stream stream, Renci.SshNet.Compression.CompressionMode mode) { }
- public void Write(byte[] buffer, int offset, int count) { }
- }
}
namespace Renci.SshNet.Security
{
public interface IKeyExchange : System.IDisposable
{
- Renci.SshNet.Security.Cryptography.Cipher CreateClientCipher();
+ Renci.SshNet.Security.Cryptography.Cipher CreateClientCipher(out bool isAead);
- Renci.SshNet.Security.Cryptography.Cipher CreateServerCipher();
+ Renci.SshNet.Security.Cryptography.Cipher CreateServerCipher(out bool isAead);
}
public abstract class KeyExchange : Renci.SshNet.Security.Algorithm, Renci.SshNet.Security.IKeyExchange, System.IDisposable
{
- public Renci.SshNet.Security.Cryptography.Cipher CreateClientCipher() { }
+ public Renci.SshNet.Security.Cryptography.Cipher CreateClientCipher(out bool isAead) { }
- public Renci.SshNet.Security.Cryptography.Cipher CreateServerCipher() { }
+ public Renci.SshNet.Security.Cryptography.Cipher CreateServerCipher(out bool isAead) { }
}
public class RsaKey : Renci.SshNet.Security.Key, System.IDisposable
{
- protected override void Finalize() { }
}
}
namespace Renci.SshNet.Security.Cryptography
{
- public abstract class AsymmetricCipher : Renci.SshNet.Security.Cryptography.Cipher
- {
- protected AsymmetricCipher() { }
- public override byte MinimumSize { get; }
- }
public abstract class BlockCipher : Renci.SshNet.Security.Cryptography.SymmetricCipher
{
- public override byte[] Decrypt(byte[] input) { }
+ public abstract int DecryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset);
+ public abstract int EncryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset);
}
public abstract class Cipher
{
- public abstract byte[] Decrypt(byte[] input);
+ public virtual int TagSize { get; }
+ public byte[] Decrypt(byte[] input) { }
}
- public abstract class CipherDigitalSignature : Renci.SshNet.Security.Cryptography.DigitalSignature
- {
- protected CipherDigitalSignature(Renci.SshNet.Common.ObjectIdentifier oid, Renci.SshNet.Security.Cryptography.AsymmetricCipher cipher) { }
- protected byte[] DerEncode(byte[] hashData) { }
- protected abstract byte[] Hash(byte[] input);
- public override byte[] Sign(byte[] input) { }
- public override bool Verify(byte[] input, byte[] signature) { }
- }
- public class RsaDigitalSignature : Renci.SshNet.Security.Cryptography.CipherDigitalSignature, System.IDisposable
+ public class RsaDigitalSignature : Renci.SshNet.Security.Cryptography.DigitalSignature, System.IDisposable
{
- protected override byte[] Hash(byte[] input) { }
+ public override byte[] Sign(byte[] input) { }
+ public override bool Verify(byte[] input, byte[] signature) { }
}
public abstract class SymmetricCipher : Renci.SshNet.Security.Cryptography.Cipher
{
- public abstract int DecryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset);
- public abstract int EncryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset);
}
}
namespace Renci.SshNet.Security.Cryptography.Ciphers
{
public sealed class Arc4Cipher : Renci.SshNet.Security.Cryptography.StreamCipher
{
- public override byte[] Decrypt(byte[] input) { }
- public override int DecryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) { }
- public override int EncryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) { }
}
- public class RsaCipher : Renci.SshNet.Security.Cryptography.AsymmetricCipher
- {
- public RsaCipher(Renci.SshNet.Security.RsaKey key) { }
- public override byte[] Decrypt(byte[] input) { }
- public override byte[] Decrypt(byte[] input, int offset, int length) { }
- public override byte[] Encrypt(byte[] input, int offset, int length) { }
- }
}
namespace Renci.SshNet.Sftp
{
- public class SftpFileSytemInformation
+ public class SftpFileSystemInformation
{
}
}
v2024.0.0
New features:
ShellStreamhas been completely rewritten, all bugs fixed and performance improved.- Allow writing to stdin of
SshCommand - Support for Trimming and AOT
- Add new MAC algorithms:
- Drop old MAC algorithms:
hmac-ripemd160hmac-ripemd160@​openssh.com
The list of changes:
- Require Microsoft.Bcl.AsyncInterfaces >=1.0.0 instead of =8.0.0 by @mus65 in https://github.com/sshnet/SSH.NET/pull/1288
- Remove unneeded feature flags and pass cancellationToken to DNS request by @mus65 in https://github.com/sshnet/SSH.NET/pull/1290
- Plumbing for more async/await work by @jacobslusser in https://github.com/sshnet/SSH.NET/pull/1281
- Fix build script by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1295
- Enable trim analysis and fix warnings by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1216
- Integration benchmark tests by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1298
- Merge nuspec and CommonAssemblyInfo into csproj by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1256
- Update gitignore by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1261
- Use BinaryPrimitives in Pack by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1305
- Tweak semaphore usage in Session by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1304
- Allow the integration tests to run on .NET Framework by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1286
- Added SshCommand.InputStream to allow writing to stdin of SshCommand by @realvizu in https://github.com/sshnet/SSH.NET/pull/1293
- Add tests and benchmarks for ShellStream.Read and Expect by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1313
- 2023.0.2 version by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1314
- Improve ShellStream Expect by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1315
- No need to collect nuget packages in appveyor.yml as the packages are not generated when build by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1317
- Significantly improve performance of ShellStream's Expect methods by @jscarle in https://github.com/sshnet/SSH.NET/pull/1207
- Fixed dequeuing of incoming queue by @jscarle in https://github.com/sshnet/SSH.NET/pull/1319
- Support ETM (Encrypt-then-MAC) variants for HMAC by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1316
- CI: remove install of net8.0 sdk on VS image by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1323
- Fix a few issues with ShellStream by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1322
- Drop RIPEMD160 by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1324
- Restore the write buffer to ShellStream by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1327
- Limit TimeSpan timeouts to Int32 MaxValue by @jscarle in https://github.com/sshnet/SSH.NET/pull/1321
- Updated dependencies. by @jscarle in https://github.com/sshnet/SSH.NET/pull/1328
- Moved IDE0005 warning configuration. by @jscarle in https://github.com/sshnet/SSH.NET/pull/1329
- Version 2024.0.0 by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1330
- Add
Closedevent toShellStream. by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1332 - Microsoft.Bcl.AsyncInterfaces version >= 1.0.0 by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1334
New Contributors
- @realvizu made their first contribution in https://github.com/sshnet/SSH.NET/pull/1293
- @jscarle made their first contribution in https://github.com/sshnet/SSH.NET/pull/1207
Full Changelog: https://github.com/sshnet/SSH.NET/compare/2023.0.1...2024.0.0
v2023.0.1
New features:
- Improve SFTP performance on medium/high latency connections
- Use System.Security.Cryptography in AesCipher
- Use hardware-accelerated AES
- Add support for .NET 8.0
- Reduces heap allocations
- And many more.
The list of changes:
- Enable list directory async for net framework by @Patrick-3000 in https://github.com/sshnet/SSH.NET/pull/1206
- Remove placeholder tests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1183
- Move test projects by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1212
- Delete more dummy tests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1213
- Update Nugets 10/2023 by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1214
- Upgrade .NET SDK from 7.402 to 7.403. by @drieseng in https://github.com/sshnet/SSH.NET/pull/1222
- Merge partial classes and complete IForwardedPort interface by @drieseng in https://github.com/sshnet/SSH.NET/pull/1223
- Fix analyzer errors in Renci.SshNet and Renci.SshNet.TestTools.OpenSSH by @drieseng in https://github.com/sshnet/SSH.NET/pull/1229
- Increase test coverage for AesCipher by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1232
- Use shared Data folder for client keys in integration tests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1219
- Use CollectionAssert in ListDirectory tests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1166
- Improve SFTP performance on medium/high latency connections by @zybexXL in https://github.com/sshnet/SSH.NET/pull/866
- Update global.json by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1240
- Tweak diagnostics by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1241
- Use System.Security.Cryptography in AesCipher by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1235
- Enable trace logging for Integration tests by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1242
- Expose SshIdentificationReceived event by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1195
- Fix avoidable exception when data length is too long by @se006 in https://github.com/sshnet/SSH.NET/pull/823
- Fix build break in Release by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1248
- Use hardware-accelerated AES CryptoServiceProvider by @zybexXL in https://github.com/sshnet/SSH.NET/pull/865
- Disable a few duplicate analyzer rules by @drieseng in https://github.com/sshnet/SSH.NET/pull/1254
- Test integration tests by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1250
- Add support for .NET 8.0 by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1255
- Fail with a friendlier error message when response has not been set by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1245
- Disable some impactful analyzers by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1246
- Rebased AsyncResult fix by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1184
- Standardizes additional file types in .editorconfig by @jacobslusser in https://github.com/sshnet/SSH.NET/pull/1266
- Replace SemaphoreLight with SemaphoreSlim by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1265
- Always use factories for HmacAlgorithms by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1262
- Native async by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1267
- Removes MessageAttribute in favor of properties on Message class by @jacobslusser in https://github.com/sshnet/SSH.NET/pull/1270
- Reduces heap allocations for the some byte[] uses by @jacobslusser in https://github.com/sshnet/SSH.NET/pull/1272
- Maintain current build solution by @scott-xu in https://github.com/sshnet/SSH.NET/pull/1268
- Send the client key exchange init in Connect by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1274
- Add a few spans on net6.0 or greater by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1138
- Make keys immutable by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1264
- Try to stabilise a few tests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1278
- Fix #1275. Hung Dispose() caused by infinite socket timeout by @jkillingsworth in https://github.com/sshnet/SSH.NET/pull/1280
- Authenticate with ssh-rsa by default by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1283
- Upgrade packages by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1279
- Remove code examples by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1210
New Contributors
- @Patrick-3000 made their first contribution in https://github.com/sshnet/SSH.NET/pull/1206
- @scott-xu made their first contribution in https://github.com/sshnet/SSH.NET/pull/1195
- @se006 made their first contribution in https://github.com/sshnet/SSH.NET/pull/823
- @jacobslusser made their first contribution in https://github.com/sshnet/SSH.NET/pull/1266
- @jkillingsworth made their first contribution in https://github.com/sshnet/SSH.NET/pull/1280
Full Changelog: https://github.com/sshnet/SSH.NET/compare/2023.0.0...2023.0.1
v2023.0.0
New features:
- Support for .NET 6, 7, and .NET Standard 2.1
- Support for RSA-SHA256/512 signature algorithms
- Support for parsing OpenSSH keys with ECDSA 256/384/521 and RSA
- Support for SHA256 and MD5 fingerprints for host key validation
- Added async support to
SftpClientandSftpFileStream - Added
ISftpFileinterface toSftpFile - Removed support for old target frameworks
- Improved performance and stability
- Added the ability to set the last write and access time for Sftp files
The list of changes:
- Assets/logos by @Filini in https://github.com/sshnet/SSH.NET/pull/782
- OPENSSH KeyReader for more keys by @darinkes in https://github.com/sshnet/SSH.NET/pull/614
- Add interface to SftpFile #120 by @wxtsxt in https://github.com/sshnet/SSH.NET/pull/812
- Start MessageListener with ThreadAbstraction.ExecuteThreadLongRunning #2 by @IgorMilavec in https://github.com/sshnet/SSH.NET/pull/902
- Add async support to SftpClient and SftpFileStream by @IgorMilavec in https://github.com/sshnet/SSH.NET/pull/819
- Fix virus false-positive by Defender on Renci.SSHNet.Tests.dll by @zybexXL in https://github.com/sshnet/SSH.NET/pull/867
- Add unit tests for task-based asynchronous API by @IgorMilavec in https://github.com/sshnet/SSH.NET/pull/906
- correct 'Documenation' to 'Documentation' by @maxijabase in https://github.com/sshnet/SSH.NET/pull/838
- Agent auth and Keygen by @darinkes in https://github.com/sshnet/SSH.NET/pull/794
- Add IBaseClient for BaseClient and ISftpClient to inherit from by @Owen-Krueger in https://github.com/sshnet/SSH.NET/pull/975
- Fix typo by @psh9508 in https://github.com/sshnet/SSH.NET/pull/999
- Fix Seek Operations in SftpFileStream by @lemonyte in https://github.com/sshnet/SSH.NET/pull/910
- Add back copyright to license by @drieseng in https://github.com/sshnet/SSH.NET/pull/1060
- Removing old target frameworks by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1109
- Remove old features [Part 1] by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1117
- Remove FEATURE_DIRECTORYINFO_ENUMERATEFILES by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1119
- Fix some (lots of) issues reported by analyzers. by @drieseng in https://github.com/sshnet/SSH.NET/pull/1125
- Round 2 of analyzer fixes and general cleanup. by @drieseng in https://github.com/sshnet/SSH.NET/pull/1132
- Analyzer fixes round 3. by @drieseng in https://github.com/sshnet/SSH.NET/pull/1135
- Replace Array<T>.Empty with Array.Empty<T>() by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1137
- Replace IsNullOrWhiteSpace extension by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1142
- Use License Expression for NuGet Package by @mus65 in https://github.com/sshnet/SSH.NET/pull/1146
- MSTest Integration tests by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1148
- ListDirectoryAsync return IAsyncEnumerable by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1126
- Fix the assembly resolution build warning by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1165
- Delete performance/longrunning tests by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1143
- Move Integration tests by @WojciechNagorski in https://github.com/sshnet/SSH.NET/pull/1173
- Add a benchmarks project by @Rob-Hague in https://github.com/sshnet/SSH.NET/pull/1151
- Use ExceptionDispatchInfo to retain call stack in Session.WaitOnHandle() by @IgorMilavec in https://github.com/sshnet/SSH.NET/pull/936
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.