Module Awa.Server

val src : Logs.src
module Log : Logs.LOG
type 'authie auth_state =
  1. | Preauth
  2. | Inprogress of string * string * int
  3. | Done of 'authie
type pubkeyauth = {
  1. pubkey : Hostkey.pub;
  2. session_id : string;
  3. service : string;
  4. sig_alg : Hostkey.alg;
  5. signed : string;
}
val pubkey_of_pubkeyauth : pubkeyauth -> Hostkey.pub
val verify_pubkeyauth : user:string -> pubkeyauth -> bool
type userauth =
  1. | Password of string
  2. | Pubkey of pubkeyauth
type event =
  1. | Channel_exec of int32 * string
  2. | Channel_subsystem of int32 * string
  3. | Channel_data of int32 * string
  4. | Channel_eof of int32
  5. | Disconnected of string
  6. | Userauth of string * userauth
  7. | Pty of string * int32 * int32 * int32 * int32 * string
  8. | Pty_set of int32 * int32 * int32 * int32
  9. | Set_env of string * string
  10. | Start_shell of int32
val pp_event : Stdlib.Format.formatter -> event -> unit
type 'authie t = {
  1. client_version : string option;
  2. server_version : string;
  3. client_kexinit : Ssh.kexinit option;
  4. server_kexinit : Ssh.kexinit;
  5. neg_kex : Kex.negotiation option;
  6. ext_info : bool;
  7. host_key : Hostkey.priv;
  8. session_id : string option;
  9. keys_ctos : Kex.keys;
  10. keys_stoc : Kex.keys;
  11. new_keys_ctos : Kex.keys option;
  12. new_keys_stoc : Kex.keys option;
  13. keying : bool;
  14. key_eol : Mtime.t option;
  15. expect : Ssh.message_id option;
  16. auth_state : 'authie auth_state;
  17. channels : Channel.db;
  18. ignore_next_packet : bool;
  19. dh_group : (Mirage_crypto_pk.Dh.group * int32 * int32 * int32) option;
}
val guard_msg : 'a t -> Ssh.message -> (unit, string) Stdlib.result
val host_key_algs : Hostkey.priv -> Hostkey.alg list
val make : Hostkey.priv -> 'a t * Ssh.message list
val of_new_keys_ctos : 'a t -> ('a t, string) Stdlib.result
val of_new_keys_stoc : 'a t -> ('a t, string) Stdlib.result
val rekey : 'a t -> ('a t * Ssh.message) option
val should_rekey : 'a t -> Mtime.t -> bool
val maybe_rekey : 'a t -> Mtime.t -> ('a t * Ssh.message) option
val pop_msg2 : 'a t -> string -> ('a t * Ssh.message option * string, string) Stdlib.result
val make_noreply : 'a -> ('a * 'b list * 'c option, 'd) Stdlib.result
val make_reply : 'a -> 'b -> ('a * 'b list * 'c option, 'd) Stdlib.result
val make_replies : 'a -> 'b -> ('a * 'b * 'c option, 'd) Stdlib.result
val make_event : 'a -> 'b -> ('a * 'c list * 'b option, 'd) Stdlib.result
val make_reply_with_event : 'a -> 'b -> 'c -> ('a * 'b list * 'c option, 'd) Stdlib.result
val make_disconnect : 'a -> Ssh.disconnect_code -> string -> ('a * Ssh.message list * event option, 'b) Stdlib.result
val input_userauth_request : 'a t -> string -> string -> Ssh.auth_method -> ('a t * Ssh.message list * event option, string) Stdlib.result
val reject_userauth : 'a t -> 'b -> ('c t * Ssh.message, string) Stdlib.result
val accept_userauth : 'a t -> 'b -> 'c -> ('c t * Ssh.message, string) Stdlib.result
val input_channel_open : 'a t -> int32 -> int32 -> int32 -> Ssh.channel_open -> ('a t * Ssh.message list * 'b option, 'c) Stdlib.result
val input_channel_request : 'a t -> Channel.Channel_map.key -> bool -> Ssh.channel_request -> ('a t * Ssh.message list * event option, 'b) Stdlib.result
val input_msg : 'a t -> Ssh.message -> Mtime.t -> ('a t * Ssh.message list * event option, string) Stdlib.result
val output_msg : 'a t -> Ssh.message -> ('a t * string, string) Stdlib.result
val output_channel_data : 'a t -> Channel.Channel_map.key -> string -> ('a t * Ssh.message list, string) Stdlib.result
val eof : 'a t -> Channel.Channel_map.key -> 'a t * string list
val close : 'a t -> Channel.Channel_map.key -> 'a t * string option