mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-04 07:55:05 +01:00
Merge pull request #9718 from SparkiDev/tls12_msg_order_checks
TLS 1.2 message order check: certificate before CKE
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user