diff --git a/src/internal.c b/src/internal.c index a2b3864492..e5bfd3fe17 100644 --- a/src/internal.c +++ b/src/internal.c @@ -17613,7 +17613,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;