mirror of https://github.com/ospab/ostp.git
fix(core): add raw_len and noise_len to noise-read error
This commit is contained in:
parent
b57a3180bd
commit
7c84c17336
|
|
@ -243,7 +243,9 @@ impl ProtocolMachine {
|
|||
tracing::info!("handle_inbound: raw_vec.len()={}, noise_len={}, raw_vec[0..6]={:?}", raw_vec.len(), noise_len, &raw_vec[0..6]);
|
||||
|
||||
let mut read_out = vec![0_u8; 1024];
|
||||
let n = self.noise.read_handshake(&raw_vec[6..6 + noise_len], &mut read_out)?;
|
||||
let n = self.noise.read_handshake(&raw_vec[6..6 + noise_len], &mut read_out).map_err(|e| {
|
||||
ProtocolError::Crypto(format!("noise-read: {:?} (raw_len={}, noise_len={})", e, raw_vec.len(), noise_len))
|
||||
})?;
|
||||
read_out.truncate(n);
|
||||
|
||||
let response = match self.role {
|
||||
|
|
|
|||
Loading…
Reference in New Issue