Skip to content

Commit 5117acb

Browse files
harden compare of mac with TLS 1.3 finished
1 parent 350706d commit 5117acb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tls13.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11178,7 +11178,7 @@ int DoTls13Finished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
1117811178
if (sniff == NO_SNIFF) {
1117911179
/* Actually check verify data. */
1118011180
if (size > WC_MAX_DIGEST_SIZE ||
11181-
XMEMCMP(input + *inOutIdx, mac, size) != 0){
11181+
ConstantCompare(input + *inOutIdx, mac, size) != 0){
1118211182
WOLFSSL_MSG("Verify finished error on hashes");
1118311183
SendAlert(ssl, alert_fatal, decrypt_error);
1118411184
WOLFSSL_ERROR_VERBOSE(VERIFY_FINISHED_ERROR);

0 commit comments

Comments
 (0)