Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed May 10, 2024
1 parent e062335 commit 1b0a119
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion russh/src/kex/ecdh_nistp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ where
return Err(crate::Error::Inconsistent);
}

#[allow(clippy::indexing_slicing)] // length checked
elliptic_curve::PublicKey::<C>::from_sec1_bytes(&payload[5..(5 + pubkey_len)])
.map_err(|_| crate::Error::Inconsistent)?
};
Expand Down Expand Up @@ -154,7 +155,7 @@ where
buffer.extend_ssh_string(&exchange.server_ephemeral);

if let Some(ref shared) = self.shared_secret {
buffer.extend_ssh_mpint(&shared.raw_secret_bytes());
buffer.extend_ssh_mpint(shared.raw_secret_bytes());
}

use sha2::Digest;
Expand Down

0 comments on commit 1b0a119

Please sign in to comment.