From 4022ef69f39a4d75067be0b94dd775e7fcc805ad Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Thu, 27 Apr 2023 15:30:16 +0200 Subject: [PATCH] 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 Reviewed-by: Norbert Pocs --- tests/server/test_server/test_server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/server/test_server/test_server.c b/tests/server/test_server/test_server.c index 4aef7531..da0b1b3f 100644 --- a/tests/server/test_server/test_server.c +++ b/tests/server/test_server/test_server.c @@ -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; }