File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -17666,6 +17666,20 @@ static int SanityCheckMsgReceived(WOLFSSL* ssl, byte type)
1766617666 WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
1766717667 return OUT_OF_ORDER_E;
1766817668 }
17669+ if (!ssl->options.resuming && ssl->specs.kea != rsa_kea &&
17670+ (ssl->specs.kea != ecc_diffie_hellman_kea ||
17671+ !ssl->specs.static_ecdh) &&
17672+ ssl->specs.kea != ecc_static_diffie_hellman_kea &&
17673+ !ssl->msgsReceived.got_server_key_exchange) {
17674+ WOLFSSL_MSG("No ServerKeyExchange before CertificateRequest");
17675+ WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
17676+ return OUT_OF_ORDER_E;
17677+ }
17678+ if (!ssl->msgsReceived.got_certificate) {
17679+ WOLFSSL_MSG("No Certificate before CertificateRequest");
17680+ WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
17681+ return OUT_OF_ORDER_E;
17682+ }
1766917683 if (ssl->msgsReceived.got_server_hello_done) {
1767017684 WOLFSSL_MSG("CertificateRequest received in wrong order");
1767117685 WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
You can’t perform that action at this time.
0 commit comments