mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-15 17:05:05 +01:00
many improvements
This commit is contained in:
parent
7a129eba2e
commit
193f762ae9
6 changed files with 188 additions and 46 deletions
|
|
@ -162,16 +162,17 @@ impl ServerConnection {
|
|||
} => {
|
||||
let kex = KeyExchangeInitPacket::parse(&packet.payload)?;
|
||||
|
||||
let require_algorithm =
|
||||
|expected: &'static str, list: NameList<'_>| -> Result<&'static str> {
|
||||
if list.iter().any(|alg| alg == expected) {
|
||||
Ok(expected)
|
||||
} else {
|
||||
Err(client_error!(
|
||||
let require_algorithm = |expected: &'static str,
|
||||
list: NameList<'_>|
|
||||
-> Result<&'static str> {
|
||||
if list.iter().any(|alg| alg == expected) {
|
||||
Ok(expected)
|
||||
} else {
|
||||
Err(client_error!(
|
||||
"client does not supported algorithm {expected}. supported: {list:?}",
|
||||
))
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
let key_algorithm = require_algorithm("curve25519-sha256", kex.kex_algorithms)?;
|
||||
let server_host_key_algorithm =
|
||||
|
|
|
|||
|
|
@ -88,6 +88,9 @@ ctors! {
|
|||
|
||||
fn new_msg_channel_eof(SSH_MSG_CHANNEL_EOF; recipient_channel: u32);
|
||||
fn new_msg_channel_close(SSH_MSG_CHANNEL_CLOSE; recipient_channel: u32);
|
||||
|
||||
fn new_msg_channel_request_exit_status(SSH_MSG_CHANNEL_REQUEST; recipient_channel: u32, kind_exit_status: string, false_: bool, exit_status: u32);
|
||||
|
||||
fn new_msg_channel_success(SSH_MSG_CHANNEL_SUCCESS; recipient_channel: u32);
|
||||
fn new_msg_channel_failure(SSH_MSG_CHANNEL_FAILURE; recipient_channel: u32);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue