This commit is contained in:
nora 2024-08-25 18:00:43 +02:00
parent 1c346659f6
commit 8114b5a195
9 changed files with 433 additions and 21 deletions

View file

@ -13,7 +13,7 @@ pub struct Channel {
}
impl Channel {
pub async fn send(&mut self, op: ChannelOperationKind) -> Result<()> {
pub async fn send(&self, op: ChannelOperationKind) -> Result<()> {
self.ops_send
.send(self.number.construct_op(op))
.await

View file

@ -59,6 +59,7 @@ pub struct ServerAuthVerify {
Option<Arc<dyn Fn(VerifyPassword) -> BoxFuture<'static, Result<()>> + Send + Sync>>,
pub verify_pubkey:
Option<Arc<dyn Fn(VerifyPubkey) -> BoxFuture<'static, Result<()>> + Send + Sync>>,
pub auth_banner: Option<String>,
}
fn _assert_send_sync() {
fn send<T: Send + Sync>() {}
@ -125,6 +126,7 @@ impl<S: AsyncRead + AsyncWrite> ServerConnection<S> {
cluelessh_protocol::ThreadRngRand,
),
options,
auth_verify.auth_banner.clone(),
),
new_channels: VecDeque::new(),
auth_verify,