diff --git a/src/internal.c b/src/internal.c index f7f0b26d644..580456f0236 100644 --- a/src/internal.c +++ b/src/internal.c @@ -17611,7 +17611,8 @@ int DoFinished(WOLFSSL* ssl, const byte* input, word32* inOutIdx, word32 size, #endif if (sniff == NO_SNIFF) { - if (XMEMCMP(input + *inOutIdx, &ssl->hsHashes->verifyHashes,size) != 0){ + if (ConstantCompare(input + *inOutIdx, + (const byte*)&ssl->hsHashes->verifyHashes, (int)size) != 0) { WOLFSSL_MSG("Verify finished error on hashes"); WOLFSSL_ERROR_VERBOSE(VERIFY_FINISHED_ERROR); return VERIFY_FINISHED_ERROR;