From 60c5d494c24358c7add1100e764ece68b36cfd24 Mon Sep 17 00:00:00 2001 From: jubeormk1 Date: Tue, 26 Aug 2025 16:00:03 +1000 Subject: [PATCH 1/3] Bumping CI minimum version to 1.85 More on this version [here](https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 581b1b2a..5a23e60f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,8 @@ jobs: all: strategy: matrix: - # 1.83 is an arbitrary minimum, tested to notice when it bumps - rust_version: [stable, nightly, 1.83] + # 1.85 is an arbitrary minimum, tested to notice when it bumps + rust_version: [stable, nightly, 1.85] runs-on: ubuntu-latest env: RUSTUP_TOOLCHAIN: ${{ matrix.rust_version }} From 286b2c64d488919a33be0d417ecedfe1edeb7383 Mon Sep 17 00:00:00 2001 From: jubeormk1 Date: Fri, 22 Aug 2025 11:54:28 +1000 Subject: [PATCH 2/3] Needed to add variants for SSHEncode/Decode for u64 --- src/sshwire.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/sshwire.rs b/src/sshwire.rs index bfd698ab..1733ee5d 100644 --- a/src/sshwire.rs +++ b/src/sshwire.rs @@ -486,6 +486,12 @@ impl SSHEncode for u32 { } } +impl SSHEncode for u64 { + fn enc(&self, s: &mut dyn SSHSink) -> WireResult<()> { + s.push(&self.to_be_bytes()) + } +} + // no length prefix impl SSHEncode for &[u8] { fn enc(&self, s: &mut dyn SSHSink) -> WireResult<()> { @@ -555,6 +561,16 @@ impl<'de> SSHDecode<'de> for u32 { } } +impl<'de> SSHDecode<'de> for u64 { + fn dec(s: &mut S) -> WireResult + where + S: SSHSource<'de>, + { + let t = s.take(core::mem::size_of::())?; + Ok(u64::from_be_bytes(t.try_into().unwrap())) + } +} + /// Decodes a SSH name string. Must be ASCII /// without control characters. RFC4251 section 6. pub fn try_as_ascii(t: &[u8]) -> WireResult<&AsciiStr> { From 3172bc855569939540cb4b9a628b3686f668cc03 Mon Sep 17 00:00:00 2001 From: jubeormk1 Date: Mon, 25 Aug 2025 13:16:46 +1000 Subject: [PATCH 3/3] Fixed unexpected intra-doc link error Most likely accidentally using the same format for the key list as intra-doc links --- src/namelist.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/namelist.rs b/src/namelist.rs index a793b246..c9bc90b4 100644 --- a/src/namelist.rs +++ b/src/namelist.rs @@ -24,7 +24,7 @@ use sshwire::{BinString, SSHDecode, SSHEncode, SSHSink, SSHSource, WireResult}; /// Max count of LocalNames entries /// -/// Current max is for kex, [mlkem, curve25519, curve25519@libssh, ext-info, strictkex, kexguess2] +/// Current max is for kex: (mlkem, curve25519, curve25519@libssh, ext-info, strictkex, kexguess2) pub const MAX_LOCAL_NAMES: usize = 6; static EMPTY_LOCALNAMES: LocalNames = LocalNames::new();