diff options
Diffstat (limited to 'oxish-proto/src/io.rs')
| -rw-r--r-- | oxish-proto/src/io.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/oxish-proto/src/io.rs b/oxish-proto/src/io.rs index 313a652..baa6ac2 100644 --- a/oxish-proto/src/io.rs +++ b/oxish-proto/src/io.rs @@ -6,8 +6,10 @@ use zeroize::Zeroize; use crate::{ Completion, Decode, Decoded, Encode, IncomingPacket, MessageType, PacketLength, PaddingLength, ProtoError, + auth::UserAuthFailure, crypto::{HandshakeHash, OpeningKey, SealingKey, SecureRandom}, key_exchange::StrictKeyExchange, + named::MethodName, }; /// The reader and decryption state for an SSH connection @@ -189,6 +191,14 @@ impl Encoder<'_> { Encoder { write } } + /// Send a `SSH_MSG_USERAUTH_FAILURE` message to the client + pub fn send_auth_failed(&mut self, can_continue: &[MethodName<'_>]) -> Result<(), ProtoError> { + self.enqueue(&UserAuthFailure { + can_continue, + partial_success: false, + }) + } + /// Encode and enqueue a packet for sending pub fn enqueue(&mut self, payload: &impl Encode) -> Result<(), ProtoError> { self.write.handle_packet(payload, None) |
