diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-07-09 23:01:34 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-07-09 23:01:34 +0200 |
commit | b68a1e782c4a4567dd5252fac1795804e2c20458 (patch) | |
tree | 024f06fccaf67b4bb3dc9302c5d6b4134b68d196 /ssh/client.c | |
parent | 295e4d6da821521b0956c7e8fe2eed55c3953f73 (diff) |
ssh: Add userdata to sshnc hostkey checker
Diffstat (limited to 'ssh/client.c')
-rw-r--r-- | ssh/client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ssh/client.c b/ssh/client.c index b9bd52a..5c7f084 100644 --- a/ssh/client.c +++ b/ssh/client.c @@ -45,7 +45,8 @@ static bool prompt_yn(const char *text) { return response; } -static bool hostkey_checker(const unsigned char *hash, size_t length) { +static bool hostkey_checker(const unsigned char *hash, size_t length, void *userdata) { + (void)userdata; printf("Server host key hash: %s\n", sshnc_print_hash(hash, length)); bool response = prompt_yn( @@ -75,7 +76,7 @@ int main(int argc, char **argv) { struct sshnc_client *client; enum sshnc_retval ret = sshnc_connect( - server_host, port, "tomsg", "tomsg", hostkey_checker, &client); + server_host, port, "tomsg", "tomsg", hostkey_checker, NULL, &client); if (ret != SSHNC_OK) { fprintf(stderr, "Could not connect: %s\n", sshnc_strerror(ret)); |