Commit 643be05
authored
Fix block ciphers + HMAC_SHA1_ETM (#298)
Due to an incorrect specified array length, any combinaison of a cipher
using `block.rs`and `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.1 parent 2577754 commit 643be05
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments