DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
SshSession Struct Reference

#include <ssh_transport.h>

Public Attributes

SshPhase phase
 Current handshake phase.
 
SshKexAlg kex_alg
 negotiated in KEXINIT.
 
SshHostkeyAlg hostkey_alg
 negotiated in KEXINIT.
 
uint8_t cipher_alg
 SSH_CIPHER_* negotiated in KEXINIT (0 = aes256-ctr).
 
uint8_t mac_alg
 SSH_MAC_* negotiated in KEXINIT (aes cipher only; 0 = hmac-sha2-256).
 
uint8_t ecdh_sk [32]
 Server X25519 ephemeral private (curve25519 KEX only; wiped after).
 
uint8_t ecdh_pk [32]
 Server X25519 ephemeral public (curve25519 KEX only).
 
char v_c [SSH_VERSION_MAX]
 Client identification string (no CR LF).
 
uint16_t v_c_len
 Length of v_c.
 
uint8_t banner_buf [SSH_VERSION_MAX]
 Accumulator for the inbound banner.
 
uint16_t banner_len
 Bytes buffered in banner_buf.
 
uint8_t i_c [SSH_KEXINIT_MAX]
 Client KEXINIT payload (for H).
 
uint16_t i_c_len
 Length of i_c.
 
uint8_t i_s [SSH_KEXINIT_S_MAX]
 Server KEXINIT payload (for H).
 
uint16_t i_s_len
 Length of i_s.
 
uint8_t session_id [SSH_SHA256_DIGEST_LEN]
 H from the first KEX (RFC 4253 §7.2).
 
bool have_session_id
 True once the first KEX completes.
 
bool ext_info_c
 Client advertised ext-info-c (RFC 8308): send EXT_INFO.
 
bool authed
 True after successful user authentication.
 
uint8_t auth_failures
 Failed USERAUTH_REQUESTs (brute-force limit, RFC 4252 §4).
 
uint32_t last_kex_ms
 detws_millis() when the last KEX completed (server-initiated re-key timer).
 

Detailed Description

Definition at line 106 of file ssh_transport.h.

Member Data Documentation

◆ phase

◆ kex_alg

SshKexAlg SshSession::kex_alg

negotiated in KEXINIT.

Definition at line 110 of file ssh_transport.h.

Referenced by ssh_kex_generate(), ssh_kexdh_handle(), and ssh_kexinit_parse().

◆ hostkey_alg

SshHostkeyAlg SshSession::hostkey_alg

negotiated in KEXINIT.

Definition at line 111 of file ssh_transport.h.

Referenced by ssh_kexinit_parse().

◆ cipher_alg

uint8_t SshSession::cipher_alg

SSH_CIPHER_* negotiated in KEXINIT (0 = aes256-ctr).

Definition at line 112 of file ssh_transport.h.

Referenced by ssh_kexdh_handle(), and ssh_kexinit_parse().

◆ mac_alg

uint8_t SshSession::mac_alg

SSH_MAC_* negotiated in KEXINIT (aes cipher only; 0 = hmac-sha2-256).

Definition at line 113 of file ssh_transport.h.

Referenced by ssh_kexdh_handle(), and ssh_kexinit_parse().

◆ ecdh_sk

uint8_t SshSession::ecdh_sk[32]

Server X25519 ephemeral private (curve25519 KEX only; wiped after).

Definition at line 114 of file ssh_transport.h.

Referenced by ssh_kexdh_handle().

◆ ecdh_pk

uint8_t SshSession::ecdh_pk[32]

Server X25519 ephemeral public (curve25519 KEX only).

Definition at line 115 of file ssh_transport.h.

Referenced by ssh_kexdh_handle().

◆ v_c

char SshSession::v_c[SSH_VERSION_MAX]

Client identification string (no CR LF).

Definition at line 117 of file ssh_transport.h.

Referenced by ssh_transport_recv_banner().

◆ v_c_len

uint16_t SshSession::v_c_len

Length of v_c.

Definition at line 118 of file ssh_transport.h.

Referenced by ssh_transport_recv_banner().

◆ banner_buf

uint8_t SshSession::banner_buf[SSH_VERSION_MAX]

Accumulator for the inbound banner.

Definition at line 120 of file ssh_transport.h.

Referenced by ssh_transport_recv_banner().

◆ banner_len

uint16_t SshSession::banner_len

Bytes buffered in banner_buf.

Definition at line 121 of file ssh_transport.h.

Referenced by ssh_transport_recv_banner().

◆ i_c

uint8_t SshSession::i_c[SSH_KEXINIT_MAX]

Client KEXINIT payload (for H).

Definition at line 123 of file ssh_transport.h.

Referenced by ssh_kexinit_parse().

◆ i_c_len

uint16_t SshSession::i_c_len

Length of i_c.

Definition at line 124 of file ssh_transport.h.

Referenced by ssh_kexinit_parse().

◆ i_s

uint8_t SshSession::i_s[SSH_KEXINIT_S_MAX]

Server KEXINIT payload (for H).

Definition at line 125 of file ssh_transport.h.

Referenced by ssh_kexinit_build().

◆ i_s_len

uint16_t SshSession::i_s_len

Length of i_s.

Definition at line 126 of file ssh_transport.h.

Referenced by ssh_kexinit_build().

◆ session_id

uint8_t SshSession::session_id[SSH_SHA256_DIGEST_LEN]

H from the first KEX (RFC 4253 §7.2).

Definition at line 128 of file ssh_transport.h.

Referenced by ssh_kexdh_handle().

◆ have_session_id

bool SshSession::have_session_id

True once the first KEX completes.

Definition at line 129 of file ssh_transport.h.

Referenced by ssh_kexdh_handle().

◆ ext_info_c

bool SshSession::ext_info_c

Client advertised ext-info-c (RFC 8308): send EXT_INFO.

Definition at line 131 of file ssh_transport.h.

Referenced by ssh_kexinit_parse(), and ssh_server_dispatch().

◆ authed

bool SshSession::authed

True after successful user authentication.

Definition at line 132 of file ssh_transport.h.

Referenced by ssh_auth_handle_request(), ssh_newkeys_complete(), and ssh_server_dispatch().

◆ auth_failures

uint8_t SshSession::auth_failures

Failed USERAUTH_REQUESTs (brute-force limit, RFC 4252 §4).

Definition at line 133 of file ssh_transport.h.

Referenced by ssh_server_dispatch().

◆ last_kex_ms

uint32_t SshSession::last_kex_ms

detws_millis() when the last KEX completed (server-initiated re-key timer).

Definition at line 134 of file ssh_transport.h.

Referenced by ssh_conn_poll(), and ssh_newkeys_complete().


The documentation for this struct was generated from the following file: