1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

test_server: Check for hostkey

The address was tested twice so repurposed the needless check for the check for
hostkey, which is also mandatory

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Jakub Jelen
2023-04-27 15:30:16 +02:00
parent 20f52432fc
commit 4022ef69f3

View File

@ -121,8 +121,9 @@ int run_server(struct server_state_st *state)
return SSH_ERROR;
}
if (state->address == NULL) {
fprintf(stderr, "Missing bind address\n");
if (state->host_key == NULL && state->rsa_key == NULL &&
state->ecdsa_key == NULL && state->ed25519_key) {
fprintf(stderr, "Missing host key\n");
return SSH_ERROR;
}