Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix block ciphers + HMAC_SHA1_ETM #298

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Fix block ciphers + HMAC_SHA1_ETM #298

merged 1 commit into from
Jun 7, 2024

Conversation

Barre
Copy link
Contributor

@Barre Barre commented Jun 7, 2024

Due to an incorrect specified array length, any combinaison of a cipher using block.rsand HMAC_SHA1_ETM such as:

let mut config = client::Config::default();
config.preferred.cipher = &[cipher::AES_128_CTR];
config.preferred.mac = &[mac::HMAC_SHA1_ETM];

Would fail during packet auth.

[...]
[2024-06-07T12:49:14Z DEBUG russh::cipher] reading, clear len = 276
[2024-06-07T12:49:14Z DEBUG russh::cipher] read_exact 280
[2024-06-07T12:49:14Z DEBUG russh::cipher] read_exact done
[2024-06-07T12:49:14Z TRACE russh::client] disconnected
[2024-06-07T12:49:14Z DEBUG russh::client] disconnected: Error(PacketAuth)
[2024-06-07T12:49:14Z TRACE mio::poll] deregistering event source from poller
[2024-06-07T12:49:14Z DEBUG russh::client] drop session
[2024-06-07T12:49:14Z DEBUG russh::client] drop handle

This PR fixes that.

@Eugeny
Copy link
Owner

Eugeny commented Jun 7, 2024

Thank you!

@all-contributors please add @Barre for code

@Eugeny Eugeny merged commit 643be05 into Eugeny:main Jun 7, 2024
4 checks passed
Copy link
Contributor

@Eugeny

I've put up a pull request to add @Barre! 🎉

Eugeny pushed a commit that referenced this pull request Jun 7, 2024
Adds @Barre as a contributor for code.

This was requested by Eugeny [in this
comment](#298 (comment))

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@Barre
Copy link
Contributor Author

Barre commented Jun 7, 2024

Thank you!

@all-contributors please add @Barre for code

Thank you as well, love the work you did with russh.

Copy link
Contributor

@Barre

@Barre already contributed before to code

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.

2 participants