Skip to content

Commit e880f59

Browse files
authored
Merge pull request #9874 from Frauschi/f12
Harden hash comparison in TLS1.2 finished
2 parents 7cf118e + eaa40f3 commit e880f59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/internal.c

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

1761517615
if (sniff == NO_SNIFF) {
17616-
if (XMEMCMP(input + *inOutIdx, &ssl->hsHashes->verifyHashes,size) != 0){
17616+
if (ConstantCompare(input + *inOutIdx,
17617+
(const byte*)&ssl->hsHashes->verifyHashes, (int)size) != 0) {
1761717618
WOLFSSL_MSG("Verify finished error on hashes");
1761817619
WOLFSSL_ERROR_VERBOSE(VERIFY_FINISHED_ERROR);
1761917620
return VERIFY_FINISHED_ERROR;

0 commit comments

Comments
 (0)