Skip to content

Commit 6de1230

Browse files
committed
scpclient.c: correct call to wolfSSH_SetPublicKeyCheckCtx
1 parent d09e00a commit 6de1230

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/scpclient/scpclient.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ THREAD_RETURN WOLFSSH_THREAD scp_client(void* args)
253253
#endif /* WOLFSSH_CERTS */
254254

255255
wolfSSH_CTX_SetPublicKeyCheck(ctx, ClientPublicKeyCheck);
256-
wolfSSH_SetPublicKeyCheckCtx(ssh, (void*)host);
257-
258256

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

261+
wolfSSH_SetPublicKeyCheckCtx(ssh, (void*)host);
262+
263263
if (password != NULL)
264264
wolfSSH_SetUserAuthCtx(ssh, (void*)password);
265265

0 commit comments

Comments
 (0)