Skip to content

Commit

Permalink
Static Memory
Browse files Browse the repository at this point in the history
1. Update the scpclient's use of the common key and cert function calls to
   pass NULL for the heap.
  • Loading branch information
ejohnstown committed Apr 26, 2024
1 parent d6d67c8 commit 2e1ca68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/scpclient/scpclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,20 +217,20 @@ THREAD_RETURN WOLFSSH_THREAD scp_client(void* args)
err_sys("Empty path values");
}

ret = ClientSetPrivateKey(privKeyName, 0);
ret = ClientSetPrivateKey(privKeyName, 0, NULL);
if (ret != 0) {
err_sys("Error setting private key");
}

#ifdef WOLFSSH_CERTS
/* passed in certificate to use */
if (certName) {
ret = ClientUseCert(certName);
ret = ClientUseCert(certName, NULL);
}
else
#endif
{
ret = ClientUsePubKey(pubKeyName, 0);
ret = ClientUsePubKey(pubKeyName, 0, NULL);
}
if (ret != 0) {
err_sys("Error setting public key");
Expand Down Expand Up @@ -327,7 +327,7 @@ THREAD_RETURN WOLFSSH_THREAD scp_client(void* args)
if (ret != WS_SUCCESS && ret != WS_SOCKET_ERROR_E)
err_sys("Closing scp stream failed. Connection could have been closed by peer");

ClientFreeBuffers(pubKeyName, privKeyName);
ClientFreeBuffers(pubKeyName, privKeyName, NULL);
#if !defined(WOLFSSH_NO_ECC) && defined(FP_ECC) && defined(HAVE_THREAD_LS)
wc_ecc_fp_free(); /* free per thread cache */
#endif
Expand Down

0 comments on commit 2e1ca68

Please sign in to comment.