Skip to content

Commit eaa40f3

Browse files
committed
Harden hash comparison in TLS1.2 finished
1 parent 1c8d593 commit eaa40f3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/internal.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17611,7 +17611,8 @@ int DoFinished(WOLFSSL* ssl, const byte* input, word32* inOutIdx, word32 size,
1761117611
#endif
1761217612

1761317613
if (sniff == NO_SNIFF) {
17614-
if (XMEMCMP(input + *inOutIdx, &ssl->hsHashes->verifyHashes,size) != 0){
17614+
if (ConstantCompare(input + *inOutIdx,
17615+
(const byte*)&ssl->hsHashes->verifyHashes, (int)size) != 0) {
1761517616
WOLFSSL_MSG("Verify finished error on hashes");
1761617617
WOLFSSL_ERROR_VERBOSE(VERIFY_FINISHED_ERROR);
1761717618
return VERIFY_FINISHED_ERROR;

0 commit comments

Comments
 (0)