Fix crash when client has no hostname

If the client is not provided a hostname, `ClientPublicKeyCheck` would
crash trying to match `targetName`. A hostname is required.
pull/768/head
Andrew Hutchings 2025-02-04 11:18:51 +00:00
parent 759bcbd36a
commit 669bf92683
1 changed files with 3 additions and 0 deletions

View File

@ -923,6 +923,9 @@ static THREAD_RETURN WOLFSSH_THREAD wolfSSH_Client(void* args)
if (config.user == NULL)
err_sys("client requires a username parameter.");
if (config.hostname == NULL)
err_sys("client requires a hostname parameter.");
#ifdef SINGLE_THREADED
if (keepOpen)
err_sys("Threading needed for terminal session\n");