Static Memory

1. Update the scpclient's use of the common key and cert function calls to
   pass NULL for the heap.
pull/682/head
John Safranek 2024-04-26 09:35:42 -07:00
parent d6d67c889c
commit 2e1ca68652
1 changed files with 4 additions and 4 deletions

View File

@ -217,7 +217,7 @@ 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");
}
@ -225,12 +225,12 @@ THREAD_RETURN WOLFSSH_THREAD scp_client(void* args)
#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");
@ -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