Skip to content

Commit d64c0c3

Browse files
committed
DH Size Fix
When creating the handshake info, initialize the size of the e and x values to their sizes.
1 parent ebca2b2 commit d64c0c3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/internal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ static HandshakeInfo* HandshakeInfoNew(void* heap)
437437
newHs->macId = ID_NONE;
438438
newHs->blockSz = MIN_BLOCK_SZ;
439439
newHs->hashId = WC_HASH_TYPE_NONE;
440+
newHs->eSz = sizeof newHs->e;
441+
newHs->xSz = sizeof newHs->x;
440442
#ifndef WOLFSSH_NO_DH_GEX_SHA256
441443
newHs->dhGexMinSz = WOLFSSH_DEFAULT_GEXDH_MIN;
442444
newHs->dhGexPreferredSz = WOLFSSH_DEFAULT_GEXDH_PREFERRED;

0 commit comments

Comments
 (0)