Skip to content

fix: fix connection drop with aes-gcm ciphers#174

Merged
vicajilau merged 1 commit into
masterfrom
fix/issue-168-aes-gcm-padding
Jun 30, 2026
Merged

fix: fix connection drop with aes-gcm ciphers#174
vicajilau merged 1 commit into
masterfrom
fix/issue-168-aes-gcm-padding

Conversation

@vicajilau

Copy link
Copy Markdown
Collaborator

Fixes #168.

This PR resolves a connection drop issue when negotiating AEAD ciphers (AES-GCM) due to an incorrect padding length check. Standard ciphers include the 4-byte packet length inside the encrypted payload boundary, whereas AEAD ciphers send it unencrypted as AAD. The padding validation is updated to use the correct AEAD-specific alignment verification.

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.90%. Comparing base (bf72e2a) to head (9c31220).

Files with missing lines Patch % Lines
lib/src/ssh_transport.dart 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #174      +/-   ##
==========================================
- Coverage   53.99%   53.90%   -0.09%     
==========================================
  Files          64       64              
  Lines        5269     5272       +3     
==========================================
- Hits         2845     2842       -3     
- Misses       2424     2430       +6     
Flag Coverage Δ
unittests 53.90% <50.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
lib/src/ssh_transport.dart 50.59% <50.00%> (-0.78%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vicajilau vicajilau merged commit 6569ef4 into master Jun 30, 2026
2 of 3 checks passed
@vicajilau vicajilau deleted the fix/issue-168-aes-gcm-padding branch June 30, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connection drops with "Invalid padding length" when using aes256-gcm

1 participant