Fixes after reviewer's comments.

pull/327/head
Daniele Lacamera 2021-03-16 09:48:36 +01:00
parent 1d15b570b7
commit a36d91bc93
1 changed files with 10 additions and 6 deletions

View File

@ -3040,6 +3040,8 @@ static int DoKexDhReply(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
#endif
sigKeyBlock_ptr = &s_sigKeyBlock;
#endif
}
if (ret == WS_SUCCESS) {
sig = buf + begin;
tmpIdx = begin;
begin += sigSz;
@ -6583,9 +6585,10 @@ int SendKexDhReply(WOLFSSH* ssh)
if (ret == WS_SUCCESS) {
if (ssh == NULL || ssh->handshake == NULL) {
return WS_BAD_ARGUMENT;
ret = WS_BAD_ARGUMENT;
}
}
if (ret == WS_SUCCESS) {
WMEMSET(sigKeyBlock_ptr, 0, sizeof(struct wolfSSH_sigKeyBlockFull));
sigKeyBlock_ptr->useRsa = ssh->handshake->pubKeyId == ID_SSH_RSA;
@ -8456,6 +8459,7 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authId, int addSig)
if (ssh == NULL)
ret = WS_BAD_ARGUMENT;
if (ret == WS_SUCCESS)
WMEMSET(keySig_ptr, 0, sizeof(WS_KeySignature));
if (ret == WS_SUCCESS) {