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 @@ -17659,6 +17659,20 @@ static int SanityCheckMsgReceived(WOLFSSL* ssl, byte type)
1765917659 WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
1766017660 return OUT_OF_ORDER_E;
1766117661 }
17662+ if (!ssl->options.resuming && ssl->specs.kea != rsa_kea &&
17663+ (ssl->specs.kea != ecc_diffie_hellman_kea ||
17664+ !ssl->specs.static_ecdh) &&
17665+ ssl->specs.kea != ecc_static_diffie_hellman_kea &&
17666+ !ssl->msgsReceived.got_server_key_exchange) {
17667+ WOLFSSL_MSG("No ServerKeyExchange before CertificateRequest");
17668+ WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
17669+ return OUT_OF_ORDER_E;
17670+ }
17671+ if (!ssl->msgsReceived.got_certificate) {
17672+ WOLFSSL_MSG("No Certificate before CertificateRequest");
17673+ WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
17674+ return OUT_OF_ORDER_E;
17675+ }
1766217676 if (ssl->msgsReceived.got_server_hello_done) {
1766317677 WOLFSSL_MSG("CertificateRequest received in wrong order");
1766417678 WOLFSSL_ERROR_VERBOSE(OUT_OF_ORDER_E);
You can’t perform that action at this time.
0 commit comments