Merge pull request #9718 from SparkiDev/tls12_msg_order_checks

TLS 1.2 message order check: certificate before CKE
This commit is contained in:
JacobBarthelmeh
2026-01-30 10:50:33 -07:00
committed by GitHub

View File

@@ -18083,6 +18083,12 @@ static int SanityCheckMsgReceived(WOLFSSL* ssl, byte type)
WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
return OUT_OF_ORDER_E;
}
if (!ssl->options.resuming && ssl->options.verifyPeer &&
!ssl->options.usingPSK_cipher &&
!ssl->options.usingAnon_cipher &&
!ssl->msgsReceived.got_certificate) {
return OUT_OF_ORDER_E;
}
if (ssl->msgsReceived.got_certificate_verify||
ssl->msgsReceived.got_change_cipher ||
ssl->msgsReceived.got_finished) {