91 Commits

Author SHA1 Message Date
Rob Hague 3bc568471e Add SshCommand.ExecuteAsync (#1426)
* Add SshCommand.ExecuteAsync

After the previous change (#1423), this basically entails swapping out the
IAsyncResult for a TaskCompletionSource and hooking up the cancellation/timeout
logic.

As with the prior Begin/End implementation, the initiation of the command
(SendExecRequest) happens synchronously, so there's a bit of room for improvement
there, but otherwise it is the Task-based async that we know and like.

I chose to make it void (Task)- returning instead of string like in the existing
overloads, so that OutputStream is not automatically consumed (and encoded as a
string) when that may not be desired. As in #650, I was initially considering
changing the other overloads to be void-returning as well, but decided that it was
not worth the break since most people will probably want to change over to
ExecuteAsync anyway.

* Update examples

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-06-19 13:02:19 +02:00
Rob Hague 919af754df Remove unnecessary DNS lookup in Connect (#1412)
The library currently performs a DNS lookup of the desired host, takes the first
returned IP address and connects to that. Instead, we can just pass the hostname
down to System.Net.Sockets which will do the right thing, potentially trying
multiple addresses if needed.

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-06-18 07:41:00 +02:00
mus65 1b71e8fea4 fix build with .NET 9.0 SDK (#1427)
* .NET 9: fix CA1872

see https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1872

* .NET 9: fix CA2022

see https://github.com/dotnet/roslyn-analyzers/pull/7208

Most of these could be safely ignored because of the following assert.
As far as I can see, The SftpFileStream.Read() implementation guarentees
that the specified number of bytes is read anyway.

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-06-16 11:35:20 +02:00
Scott Xu 9dc7db9de8 Support creating Shell(Stream) without PTY (#1419)
* Support creating Shell(Stream) without PTY
Fixes https://github.com/sshnet/SSH.NET/issues/1418

* Add integration test for "PermitTTY no"

* Fix Integration Test

* Remove duplicate shell request

* Put common operations in a shared constructor. Update xml doc comments.

* Update comments and method overriding

* Update per code review

* Update integration tests

* Renaming

* Make `bufferSize` optional

* Try fix the test

* Update per code review

* try agian

* try again

* docs

* doc

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-06-16 10:27:06 +02:00
Dejan Varmedja 830e504244 Rename SftpFileSytemInformation to SftpFileSystemInformation (#1425) 2024-06-12 12:36:16 +02:00
Rob Hague ac395dd64c A couple of changes/fixes in SshCommand (#1423)
* Send "signal" and set the wait handle on completion always

* Make ExitStatus nullable
2024-06-09 21:44:44 +02:00
mus65 dda27a3177 fix flaky SFTP file time tests (#1414)
* fix flaky SFTP file time tests

These asserts currently assume that DateTime.Now and the
creation timestamp on the server happen within the same second.

Note that I didn't change the asserts below where an explicit
timestamp is set. From my understanding, these should not be affected.

example: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49850731/job/u6lk0cyipbxkp4jd

* remove asserts
2024-06-04 21:55:38 +02:00
Rob Hague fdbc4d3e36 Fix a few issues with PipeStream (#1399)
Apply similar treatment to PipeStream as #1322 did to ShellStream

PipeStream now behaves much more Stream-like. In particular, it performs partial
reads (instead of blocking until a certain amount of data is available), blocks
until data is available (instead of returning 0 prematurely) and removes the
Stream-unlike properties `BlockLastReadBuffer` and `MaxBufferLength`.

Sadly I gave up trying to make a benchmark compatible with all the quirks of the
previous implementation, but a dumb throughput test (reading and writing simultaneously)
shows about 5.2GB/s with this implementation compared to 140MB/s previously.

Some cleanup of its usage in the library followed.

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-05-23 15:30:05 +02:00
Rob Hague b09b4f5360 Delete CountdownEventTests (#1409)
We have been using the BCL version since #1117
2024-05-22 20:35:10 +02:00
mus65 7d52787ce3 make ConnectShouldActivateKeepAliveIfSessionIs test less flaky (#1410)
* make ConnectShouldActivateKeepAliveIfSessionIs test less flaky

wait longer and expect at least two instead of exactly two.

example: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49849877/job/9rrtw6j8eu3i5p8o?fullLog=true

* fix net462 build
2024-05-21 13:05:46 +02:00
Rob Hague aa70718a86 More AsyncSocketListener patchwork (#1408)
* More AsyncSocketListener patchwork

This is Whack-a-mole part 2 in diagnosing or preventing the test host from crashing in CI.

* Fix test
2024-05-19 11:11:25 +02:00
mus65 1143ad3d24 fix flaky Sftp_BeginUploadFile test (#1402)
* fix flaky Sftp_BeginUploadFile test

this test can randomly fail because it assumes that the callback
has been called when the AsyncWaitHandle was set. But this is not
necessarily the case because AsyncResult.SetAsCompleted does it
the other way around.

example: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49831002/job/1237d4lg46j22pf0

* use ManualResetEventSlim

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-05-18 21:25:03 +02:00
mus65 fcb4ea2a1b fix flaky ReceiveOnServerSocketShouldReturnZero test (#1404)
* fix flaky ReceiveOnServerSocketShouldReturnZero test

ReceiveOnServerSocketShouldReturnZero assumed that the disconnect
already happened on the server side, but it never waits for this.
This could cause ServerSocket.Receive to still return valid data
and fail the test.

example: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49836561/job/wen5tjd1c7wgxrfh

* Update test/Renci.SshNet.Tests/Classes/SessionTest_Connected_Disconnect.cs

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-05-18 18:15:52 +02:00
mus65 fe5ed423a0 fix flaky Connectivity Tests (#1403)
these two tests were not waiting for the interruption (all other usages
of BreakConnections() did). This could cause random failures because
e.g. the wrong exception is thrown.

example: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49831433/job/4urb0upx63bvxcgu

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-05-18 14:17:10 +02:00
mus65 c0a353a4de Cleanup formatting and style and enforce it in CI (#1380)
* Preparation to enforce formatting and style in CI

- enabled IDE0055 to enforce formatting on build
- disabled SA1137 and SA1025 because they are already
  covered by IDE0055
- disabled SA1021 because it conflicts with csharp_space_after_cast

* Cleanup formatting and style on codebase

This commit has no manual changes, it is the result
of running "dotnet format whitespace" and "dotnet format style"

* new formatting fixes after merge

* appveyor: set git autocrlf

as suggested by sharwell to hopefully fix Windows CI.

* use autocrlf input

to hopefully fix Linux tests

* fix formatting

* use autocrlf input for Linux only

* set csharp_space_after_cast to false

* Revert SA1021 suppression

---------

Co-authored-by: Robert Hague <rh@johnstreetcapital.com>
2024-05-17 22:34:27 +02:00
Rob Hague 0cfeb6bb94 Tweak AsyncSocketListener in tests (#1382)
* Tweak AsyncSocketListener in tests

Some CI runs have been crashing lately from within AsyncSocketListener.
This moves a bit of disconnection & exception handling around. It probably won't
fix the underlying tests which would have otherwise failed, but it might stop the
process from outright crashing.

Also reference the same code for the integration tests.

* Simplify the diff

* Stabilise a couple of tests
2024-05-10 11:37:01 +02:00
Rob Hague f9908a22b5 Use System.Security.Cryptography for RSA (#1373)
* Use BCL for RSA

* Restore benchmark (with quirks for old code)

* Fixup benchmark (remove compatibility with old code)

* cosmetic tweaks

* Add a regression test for #1388
2024-05-10 11:35:21 +02:00
mus65 749a0e0074 drop obsolete #if directives (#1394) 2024-05-06 21:22:09 +02:00
BoronBGP c8b527397a Handle timeout correctly on Socks5 Proxy (#1342)
* Add timeouts when reading from sockets in Socks5Connector

* Add a Socks5 timeout test for a connection reply

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-04-27 20:49:24 +02:00
Scott Xu 94397d47ed Implement OpenSSH strict key exchange extension (#1366)
* Implement OpenSSH strict key exchange extension

* The pseudo-algorithm
is only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored
if they are present in subsequent SSH2_MSG_KEXINIT packets.

* Only send strict kex pseudo algorithm for the first kex.
Strictly disable non-kex massages in strict kex mode.

* Unit tests for strict kex

* More unit tests

* More unit tests

* Correct file name

* Update SessionTest_ConnectingBase.cs

* More unit tests

* Delete SessionTest_Connecting_ServerSendsMaxIgnoreMessagesBeforeKexInit.cs

* Add a comment about throwing exception when inbound sequence number is about to wrap during init kex.

* Delete SessionTest_Connecting_ServerSendsDebugMessageAfterKexInit_NoStrictKex.cs

* Fix build

* Update test/Renci.SshNet.Tests/Classes/SessionTest_Connected.cs

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-04-24 22:36:28 +02:00
Rob Hague 71423c17f9 Add an AOT compatibility test app (#1378)
* Add an AOT compatibility test app

Following the guides at
https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming?pivots=dotnet-8-0
and https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/,
add an application which is published for AOT in CI.

This process fully verifies all code-paths in the library and its dependencies
for trimming/AOT, which the analyzers are not themselves able to do.

(As a side benefit, now we are also checking the library builds in Release)

* Test failure scenario

* Revert "Test failure scenario"

This reverts commit 6ff943b502.
2024-04-19 13:00:57 +02:00
Scott Xu 3dc3fc8b1c Add support for AEAD AES 128/256 GCM Ciphers (.NET 6.0 onward only) (#1369)
* Init AeadCipher

* Move AeadCipher to parent folder. Move EncryptBlock/DecryptBlock from SymmetricCipher to BlockCipher

* simplify parameter name

* Implement AesGcmCipher

* Update README

* Remove protected IV from AeadCipher; Set offset to outbound sequence just like other ciphers

* Rename associatedData to packetLengthField

* Use Span<byte> to avoid unnecessary allocations

* Use `Span` to improve performance when `IncrementCounter()`

* Add `IsAead` property to `CipherInfo`. Include packet length field and tag field in offset and length when call AesGcm's `Decrypt(...)` method. Do not determine HMAC if cipher is AesGcm during kex.

* Fix build

* Fix UT

* Check `AesGcm.IsSupported` before add to the `Encryptions` collection.
Guard AES-GCM with `NET6_0_OR_GREATER`.
Insert AES-GCM ciphers right after AES-CTR ciphers but before AES-CBC ciphers, which is similar with OpenSSH:
```
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
```
Although Dictionary's order is not defined, from observation, it is in the same order with add. Anyway that would be another topic.

* Suppress CA1859 "Use concrete types when possible for improved performance" for `ConnectionInfo.Encryptions`.
Test `Aes128Gcm` and `Aes256Gcm` only when `NET6_0_OR_GREATER`

* Update xml doc comments. Do not treat AesGcmCipher separately in Session.cs

* Fix build

* Fix build

* Update the comment as ChaCha20Poly1305 uses a separated key to encypt the packet length and the size it 4.

* Update src/Renci.SshNet/Security/Cryptography/Cipher.cs

Co-authored-by: Rob Hague <rob.hague00@gmail.com>

* Make `AesGcmCipher` internal.
Assert offset when decrypt.

* Fix nullable error in build

* typos

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-04-18 20:06:19 +02:00
Scott Xu b553f81f8a Add support for Zlib compression (.NET 6.0 onward only) (#1326)
* Integrate `ZLibStream` from .NET 6.0+ with SSH.NET.

* OpenSSH server does not support zlib (pre-auth); OpenSSH client still supports zlib (pre-auth)

* Correct compression algorithm name; Update README.md

* Integrate `ZLibStream` from .NET 6.0+ with SSH.NET.

* OpenSSH server does not support zlib (pre-auth); OpenSSH client still supports zlib (pre-auth)

* Correct compression algorithm name; Update README.md

* Test the compression by upload/download file

* Refactor compression.

* Move delayed compression logic to base class.

* seal Zlib

* update unit test

* update unit test to see if it can trigger integration test

* Flush zlibStream

* Fix integration test

* update test

* Update ConnectionInfo.cs

Co-authored-by: Rob Hague <rob.hague00@gmail.com>

* Update README.md

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-04-17 21:39:27 +02:00
Jean-Sebastien Carle dd36d5b98a Added support for GitHub pages using docfx (#1358)
* Added support for GitHub pages using docfx

* Fixed StyleCop warning.

* Fixed other StyleCop warnings.
2024-04-17 21:32:54 +02:00
Rob Hague 7b58819537 Remove enormous array allocations in tests causing instability in CI (#1367)
* debugging CI

* apt-get

* print memory

* x

* x

* Remove some unbounded random.Next() calls

Some of which are causing giant array allocations unnecessarily. Should stabilise CI.

* cleanup
2024-04-06 21:37:59 +02:00
mus65 70a0a08dae Handle unknown channel messages correctly (#1363)
* Handle unknown channel messages correctly

See discussion #1218 . Some servers send custom channel messages
like 'keepalive@proftpd.org' as keep alive messages. This currently
causes a NotSupportedException.

According to the spec https://datatracker.ietf.org/doc/html/rfc4254#section-5.4 :

"If the request is not recognized or is not
supported for the channel, SSH_MSG_CHANNEL_FAILURE is returned."

Send a failure message back instead of throwing an exception.

* consider WantReply before sending failure reply

* Use RemoteChannelNumber for failure message

* fix wrong ChannelNumber in SshCommand Channel Response

not directly related to the PR, was noticed during Code Review.

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-04-04 16:31:04 +02:00
mus65 8bd08eda2b SftpClient: handle the SFTP session being closed by the server (#1362)
* SftpClient: handle the SFTP session being closed by the server

If the server closes the SFTP session but keeps the TCP connection open,
this currently causes IsConnected to return true, but any operation
fails with "the session is not open".

SftpClient.IsConnected now also check sftpSession.IsOpen. Connect()
and ConnectAsync() were reworked to take into account that the Session
may already/still be open, but the SFTP session may not. This is needed
so a reconnect works.

fixes #843 and #1153

* Always re-create session

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
Co-authored-by: Igor Milavec <igor.milavec@gmail.com>
2024-04-04 12:41:51 +02:00
Jean-Sebastien Carle 9be67c0c99 Cleanup and muting of analyzer warnings (#1357)
* Fixed warnings in tests.

* Fixed warnings in main project.

* Fix public key.

* Further warning cleanup.

* Muted remaining warnings.

* Final cleanup.

* Fix warning.

* Fix test classes.

* Fix more internals.

* Revert "internal" in test projects

* Revert more internals.

* Revert all non-analyzer changes.

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-04-03 21:57:35 +02:00
zeotuan db3d7e8d03 Fix CancelAsync Cause Deadlock (#1345)
* Fix CancelAsync Cause Deadlock

* Fix CancelAsync Cause Deadlock

* Support manual cancelling if exit-signal does not cancel

* Fix switch with duplicate case

* Revert wait exit response, use existing OperationCancelledException

* Not executing callback when command is cancelled
2024-03-24 14:55:26 +01:00
Scott Xu 3e6fc4f3ff Use BCL Timeout (#1353) 2024-03-14 13:02:22 +01:00
Rob Hague 69f145159a Fix ShellStream when receiving data larger than buffer length (#1337) 2024-02-24 09:25:54 +01:00
Wojciech Nagórski 442f0a9706 2024.0.0 (#1330) 2024-02-20 21:29:53 +01:00
Jean-Sebastien Carle b47b35c19b Updated dependencies. (#1328)
* Updated dependencies.

* Reverted Microsoft.Bcl.AsyncInterfaces back to version 1.0.0.

Also added a note so we no longer try to upgrade it.

* Reverted back to Moq.

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-02-20 21:19:24 +01:00
Jean-Sebastien Carle 4b9c3bf144 Limit TimeSpan timeouts to Int32 MaxValue (#1321)
* Added guard clauses to various timeouts to ensure they don't exceed an Int32 in milliseconds.

* Fixed guard clauses.

* Updated build tags.

* Added guard clauses to various timeouts to ensure they don't exceed an Int32 in milliseconds.

* Fixed tests.

* Added additional tests.

* Replaced NoWarn with .editorconfig setting

* Fixed references to parameter names.
2024-02-20 21:17:47 +01:00
Rob Hague 664595d30b Restore the write buffer to ShellStream (#1327)
* Restore Write/Flush tests

* Restore write buffer to ShellStream and painfully fix the mocks

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-02-18 06:38:11 +01:00
Rob Hague 06af2ec6c0 Fix a few issues with ShellStream (#1322)
* Fix a few issues with ShellStream

The main change is to replace the Queue<byte> with a byte[] and a couple of
variables which index the start and end of the data. The remainder is mainly
slightly more careful locking semantics.

It also implements Expect(string) separately so that it can work on the bytes
and skip a lot of encoding work (this is where I wish ShellStream derived from
StreamReader).

One possibly contentious point: in fixing the Write behaviour I chose to
remove the "outgoing" buffer and immediately send the data across the channel.
Write(string) and WriteLine(string) were already doing this, and I felt it
was better to change Write(byte[]) to match rather than changing the string
methods.

* Integrate expectSize (as "windowSize" parameter)

* Rename "windowSize" to "lookback"

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-02-16 20:11:22 +01:00
Scott Xu 7cfe62b9f1 Support ETM (Encrypt-then-MAC) variants for HMAC (#1316)
* Support ETM (Encrypt-then-MAC) variants for HMAC

* Support ETM (Encrypt-then-MAC) variants for HMAC

* Remove `ETM` property from `HashInfo`

* Add support for HmacMd5Etm, HmacMd5_96_Etm, HmacSha1Etm and HmacSha1_96_Etm
Explicitly specify etm even if false

* Add Encrypt-then-MAC variants to README.md

* Add back empty span to prevent auto link

* Store ETM in `HashInfo`;
Change `HMAC Create[...]Hash()` to `HashAlgorithm Create[...]Hash(out bool isEncryptThenMAC)`
2024-02-16 13:24:54 +01:00
Jean-Sebastien Carle d07827b6c8 Fixed dequeuing of incoming queue (#1319)
* Fixed dequeuing of incoming queue.

* Adjusted return of Expect to make sure it returns the full incoming queue.
2024-02-13 19:16:41 +01:00
Jean-Sebastien Carle bcaf354ccb Significantly improve performance of ShellStream's Expect methods (#1207)
* Significantly improved performance and fixed bug with ShellStream's Expect methods.

* Fix whitespace.

* Fixed test.

* Improve ShellStream Expect

* Fixed typo.

* Doubled expectBuffer's default size and added a large expect test.

* Added guard clauses to ShellStream constructor and adjusted Common_CreateMoreChannelsThanMaxSessions test.

* Fixed XMLDoc spelling mistakes.

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
Co-authored-by: Wojciech Nagórski <wojciech.nagorski@intel.com>
2024-02-13 13:41:47 +01:00
Wojciech Nagórski 3bfac50ad0 Improve ShellStream Expect (#1315) 2024-02-11 23:06:25 +01:00
Wojciech Nagórski dec04f26e0 2023.0.2 version (#1314) 2024-02-11 20:15:11 +01:00
Rob Hague e23f381dea Add tests and benchmarks for ShellStream.Read and Expect (#1313)
Most of them are ignored because they fail.
2024-02-11 10:00:38 +01:00
Ferenc Vizkeleti 2d0e03b8ce Added SshCommand.InputStream to allow writing to stdin of SshCommand (#1293)
* Making all unit tests pass locally.
Excluded MD5 tests on net462 because I get System.InvalidOperationException: 'This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.'
SshdConfig: do not throw for "Include", just do nothing.
Modified failing dos2unix parameters in Dockerfile.TestServer.
Forceing LF line ending for key files used by integration tests, otherwise using them causes error.
SftpClientTest.Test_Sftp_Multiple_Async_Upload_And_Download_10Files_5MB_Each times out for maxFiles=10, decreasing to 2 to make the test pass.

* Added SshCommand.InputStream.

* Added an integration test for SshCommand.InputStream.

* Reverting changes made to unit tests unrelated to this PR.

* Moved ChannelInputStream's EOF sending from Write to Dispose. Replace SshCommand.InputStream with CreateInputStream to emphasise that a (disposable) resource is created here. EndExecute also closes the _inputStream to make sure that EOF is sent (in case the user forgot to dispose the input stream). Added more unit tests: sending the input one byte at a time, not disposing the input stream, calling CreateInputStream before BeginExecute or AfterEndExecute throws exception.

* Fixing review comments.

* Fix build error after #1286

---------

Co-authored-by: ferenc.vizkeleti <ferenc.vizkeleti@innopay.hu>
Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-02-06 18:02:19 +01:00
Rob Hague bfe6718fce Allow the integration tests to run on .NET Framework (#1286)
* Allow the integration tests to run on .NET Framework

* Update appveyor.yml

* Update appveyor.yml

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-02-06 13:30:01 +01:00
Rob Hague 47eabe7574 Tweak semaphore usage in Session (#1304)
- Change _connectAndLazySemaphoreInitLock to a SemaphoreSlim and use it in
  ConnectAsync.
- Rename it to _connectLock and only use it for connecting. Replace its
  other usages (on SessionSemaphore and NextChannelNumber) with Interlocked
  operations.
- Remove AuthenticationConnection semaphore. This static member placed a
  process-wide limit on the number of connections an application can make.
  I agree with the argument in
  https://github.com/sshnet/SSH.NET/issues/409#issuecomment-457415542
  (and in several other issues/PRs) that this should not be something
  that the library attempts to control.

The last change broke a few tests which do things like making 100 connections.
I was tempted to delete these tests as I don't think they have much value, but
instead I just limited their concurrency.

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2024-02-06 13:16:11 +01:00
Wojciech Nagórski 0371af9aaf Integration benchmark tests (#1298)
* Integration benchmark tests

* Fixes

* Write with encoding

* Update src/Renci.SshNet/Common/SshDataStream.cs

Co-authored-by: Rob Hague <rob.hague00@gmail.com>

* Add more benchmarks

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2024-01-28 11:05:42 +01:00
Rob Hague 4c2dcd5613 Upgrade packages (#1279) 2023-12-29 05:06:50 +01:00
Rob Hague 2b53e462dd Authenticate with ssh-rsa by default (#1283) 2023-12-28 20:55:07 +01:00
Rob Hague b0d01df91f Try to stabilise a few tests (#1278)
* Try to stabilise a few tests

* Fix random 0 buffer sizes

---------

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2023-12-22 08:37:30 +01:00
Rob Hague 24838e6173 Make keys immutable (#1264)
This makes it easier to reason about Key instances in e.g.
DigitalSignature implementations, because we know that the
Key is initialised with its data and will not change.

Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com>
2023-12-21 23:12:15 +01:00