Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Nov 5, 2024
1 parent fa10b5f commit b9a2647
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion russh-keys/src/agent/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use byteorder::{BigEndian, ByteOrder};
use bytes::Bytes;
use log::debug;
use russh_cryptovec::CryptoVec;
use ssh_encoding::{Decode, Encode, Reader};
use ssh_key::{Algorithm, HashAlg, PrivateKey, PublicKey, Signature};
use tokio;
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};
Expand All @@ -12,7 +13,6 @@ use super::{msg, Constraint};
use crate::encoding::Encoding;
use crate::helpers::EncodedExt;
use crate::{key, Error};
use ssh_encoding::{Decode, Encode, Reader};

pub trait AgentStream: AsyncRead + AsyncWrite {}

Expand Down
2 changes: 1 addition & 1 deletion russh/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ use std::sync::Arc;

use async_trait::async_trait;
use bitflags::bitflags;
use russh_keys::helpers::NameList;
use ssh_key::{Certificate, PrivateKey};
use thiserror::Error;
use tokio::io::{AsyncRead, AsyncWrite};
use russh_keys::helpers::NameList;

use crate::CryptoVec;

Expand Down
4 changes: 3 additions & 1 deletion russh/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,9 @@ async fn reply<H: Handler>(
// We've sent ECDH_INIT, waiting for ECDH_REPLY

#[allow(clippy::indexing_slicing)] // length checked
let kex = kexdhdone.server_key_check(false, handler, &mut &buf[1..]).await?;
let kex = kexdhdone
.server_key_check(false, handler, &mut &buf[1..])
.await?;

session.common.strict_kex = session.common.strict_kex || kex.names.strict_kex;
session.common.kex = Some(Kex::Keys(kex));
Expand Down
2 changes: 1 addition & 1 deletion russh/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl Default for Config {
/// A client's response in a challenge-response authentication.
///
/// You should iterate it to get `&[u8]` response slices.
pub struct Response<'a> (&'a mut (dyn Iterator<Item = Option<Bytes>> + Send));
pub struct Response<'a>(&'a mut (dyn Iterator<Item = Option<Bytes>> + Send));

impl Iterator for Response<'_> {
type Item = Bytes;
Expand Down

0 comments on commit b9a2647

Please sign in to comment.