Skip to content

Commit

Permalink
Merge pull request #704 from wolfSSL/scp-example
Browse files Browse the repository at this point in the history
scpclient.c: correct call to wolfSSH_SetPublicKeyCheckCtx
  • Loading branch information
ejohnstown authored Jun 1, 2024
2 parents d09e00a + 6de1230 commit 0e72885
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/scpclient/scpclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ THREAD_RETURN WOLFSSH_THREAD scp_client(void* args)
#endif /* WOLFSSH_CERTS */

wolfSSH_CTX_SetPublicKeyCheck(ctx, ClientPublicKeyCheck);
wolfSSH_SetPublicKeyCheckCtx(ssh, (void*)host);


ssh = wolfSSH_new(ctx);
if (ssh == NULL)
err_sys("Couldn't create wolfSSH session.");

wolfSSH_SetPublicKeyCheckCtx(ssh, (void*)host);

if (password != NULL)
wolfSSH_SetUserAuthCtx(ssh, (void*)password);

Expand Down

0 comments on commit 0e72885

Please sign in to comment.