DH Size Fix

When creating the handshake info, initialize the size of the e and x values to their sizes.
pull/349/head
John Safranek 2021-07-15 10:00:02 -07:00
parent ebca2b2828
commit d64c0c309a
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
1 changed files with 2 additions and 0 deletions

View File

@ -437,6 +437,8 @@ static HandshakeInfo* HandshakeInfoNew(void* heap)
newHs->macId = ID_NONE;
newHs->blockSz = MIN_BLOCK_SZ;
newHs->hashId = WC_HASH_TYPE_NONE;
newHs->eSz = sizeof newHs->e;
newHs->xSz = sizeof newHs->x;
#ifndef WOLFSSH_NO_DH_GEX_SHA256
newHs->dhGexMinSz = WOLFSSH_DEFAULT_GEXDH_MIN;
newHs->dhGexPreferredSz = WOLFSSH_DEFAULT_GEXDH_PREFERRED;