mirror of https://github.com/wolfSSL/wolfssh.git
Add PacketPurge to a couple of Send functions that can error out between Prepare and BundlePacket.
parent
35616ada1d
commit
9ae319fc24
|
@ -7250,6 +7250,9 @@ int SendKexDhReply(WOLFSSH* ssh)
|
||||||
if (ret == WS_SUCCESS)
|
if (ret == WS_SUCCESS)
|
||||||
ret = SendNewKeys(ssh);
|
ret = SendNewKeys(ssh);
|
||||||
|
|
||||||
|
if (ret != WS_WANT_WRITE && ret != WS_SUCCESS)
|
||||||
|
PurgePacket(ssh);
|
||||||
|
|
||||||
WLOG(WS_LOG_DEBUG, "Leaving SendKexDhReply(), ret = %d", ret);
|
WLOG(WS_LOG_DEBUG, "Leaving SendKexDhReply(), ret = %d", ret);
|
||||||
#ifdef WOLFSSH_SMALL_STACK
|
#ifdef WOLFSSH_SMALL_STACK
|
||||||
if (sigKeyBlock_ptr)
|
if (sigKeyBlock_ptr)
|
||||||
|
@ -8612,6 +8615,9 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authId, int addSig)
|
||||||
if (ret == WS_SUCCESS)
|
if (ret == WS_SUCCESS)
|
||||||
ret = wolfSSH_SendPacket(ssh);
|
ret = wolfSSH_SendPacket(ssh);
|
||||||
|
|
||||||
|
if (ret != WS_WANT_WRITE && ret != WS_SUCCESS)
|
||||||
|
PurgePacket(ssh);
|
||||||
|
|
||||||
ForceZero(&authData, sizeof(WS_UserAuthData));
|
ForceZero(&authData, sizeof(WS_UserAuthData));
|
||||||
WLOG(WS_LOG_DEBUG, "Leaving SendUserAuthRequest(), ret = %d", ret);
|
WLOG(WS_LOG_DEBUG, "Leaving SendUserAuthRequest(), ret = %d", ret);
|
||||||
#ifdef WOLFSSH_SMALL_STACK
|
#ifdef WOLFSSH_SMALL_STACK
|
||||||
|
|
Loading…
Reference in New Issue