From d62588f8d1240f8ec550b74acd0cb761be8d491e Mon Sep 17 00:00:00 2001 From: Matt Johnston <matt@ucc.asn.au> Date: Tue, 31 May 2022 21:19:20 +0800 Subject: [PATCH] auth.rs was missing --- sshproto/src/auth.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sshproto/src/auth.rs diff --git a/sshproto/src/auth.rs b/sshproto/src/auth.rs new file mode 100644 index 0000000..4924821 --- /dev/null +++ b/sshproto/src/auth.rs @@ -0,0 +1,34 @@ +#[allow(unused_imports)] +use { + crate::error::{Error, Result, TrapBug}, + log::{debug, error, info, log, trace, warn}, +}; + +use core::task::{Poll, Waker}; +use heapless::{String, Vec}; +use serde::Serialize; + +use crate::*; +use behaviour::CliBehaviour; +use client::*; +use conn::RespPackets; +use packets::ParseContext; +use packets::{Packet, Signature, Userauth60}; +use sign::SignKey; +use sshnames::*; +use wireformat::BinString; +use sshwire_derive::SSHEncode; + +/// The message to be signed in a pubkey authentication message, +/// RFC4252 Section 7. The packet is a UserauthRequest, with None sig. +#[derive(Serialize, SSHEncode)] +pub(crate) struct AuthSigMsg<'a> { + pub sess_id: BinString<'a>, + + // always SSH_MSG_USERAUTH_REQUEST + pub msg_num: u8, + + //TODO: does encoding the whole Packet enum bloat binary? + pub u: packets::UserauthRequest<'a>, +} + -- GitLab