260 const uint8_t received_key[32]);
bool prompt_unknown_host(const char *server_ip, uint16_t port, const uint8_t server_key[32])
Interactive prompt for unknown host - returns true if user wants to add, false to abort.
void known_hosts_cleanup(void)
Cleanup function to free cached known_hosts path.
const char * get_known_hosts_path(void)
Get the path to the known_hosts file.
void compute_key_fingerprint(const uint8_t key[32], char fingerprint[65])
Compute SHA256 fingerprint of Ed25519 key for display.
bool prompt_unknown_host_no_identity(const char *server_ip, uint16_t port)
Interactive prompt for unknown host without identity key - returns true if user wants to continue,...
asciichat_error_t check_known_host_no_identity(const char *server_ip, uint16_t port)
Check known_hosts for servers without identity key (no-identity entries)
asciichat_error_t add_known_host(const char *server_ip, uint16_t port, const uint8_t server_key[32])
Add server to known_hosts.
asciichat_error_t remove_known_host(const char *server_ip, uint16_t port)
Remove server from known_hosts.
bool display_mitm_warning(const char *server_ip, uint16_t port, const uint8_t expected_key[32], const uint8_t received_key[32])
Display MITM warning with key comparison and prompt user for confirmation.
asciichat_error_t check_known_host(const char *server_ip, uint16_t port, const uint8_t server_key[32])
Check if server key is in known_hosts.
asciichat_error_t
Error and exit codes - unified status values (0-255)