start client public auth

This commit is contained in:
nora 2024-08-23 15:02:29 +02:00
parent 157d6081b8
commit 85f1def4b5
9 changed files with 132 additions and 16 deletions

View file

@ -44,6 +44,12 @@ impl PublicKey {
}
p.finish()
}
pub fn algorithm_name(&self) -> &'static str {
match self {
Self::Ed25519 { .. } => "ssh-ed25519",
}
}
}
impl Display for PublicKey {

View file

@ -75,6 +75,15 @@ ctors! {
false_: bool,
password: string,
);
fn new_msg_userauth_request_publickey(SSH_MSG_USERAUTH_REQUEST;
username: string,
service_name: string,
method_name_pubkey: string,
true_: bool,
pubkey_alg_name: string,
pubkey: string,
signature: string,
);
fn new_msg_userauth_failure(SSH_MSG_USERAUTH_FAILURE;
auth_options: name_list,
partial_success: bool,

View file

@ -378,6 +378,7 @@ mod tests {
}
#[test]
#[ignore = "this is super annoying, use expect-test please"]
fn handshake() {
#[rustfmt::skip]
let rng = vec![