Fix the Old ClientHello detection with TLS 1.3 with new state
Put the clientState into CLIENT_HELLO_RETRY (new state) when waiting for second ClientHello. Chrome sends change_cipher_spec message, for reasons of compatability, which meets the requirements of the Old ClientHello detection when state of client is NULL.
This commit is contained in:
parent
a484749f4c
commit
c628562ee7
@ -8194,7 +8194,7 @@ int wolfSSL_accept_TLSv13(WOLFSSL* ssl)
|
|||||||
case TLS13_ACCEPT_FIRST_REPLY_DONE :
|
case TLS13_ACCEPT_FIRST_REPLY_DONE :
|
||||||
if (ssl->options.serverState ==
|
if (ssl->options.serverState ==
|
||||||
SERVER_HELLO_RETRY_REQUEST_COMPLETE) {
|
SERVER_HELLO_RETRY_REQUEST_COMPLETE) {
|
||||||
ssl->options.clientState = NULL_STATE;
|
ssl->options.clientState = CLIENT_HELLO_RETRY;
|
||||||
while (ssl->options.clientState < CLIENT_HELLO_COMPLETE) {
|
while (ssl->options.clientState < CLIENT_HELLO_COMPLETE) {
|
||||||
if ((ssl->error = ProcessReply(ssl)) < 0) {
|
if ((ssl->error = ProcessReply(ssl)) < 0) {
|
||||||
WOLFSSL_ERROR(ssl->error);
|
WOLFSSL_ERROR(ssl->error);
|
||||||
|
@ -1508,6 +1508,7 @@ enum states {
|
|||||||
SERVER_CHANGECIPHERSPEC_COMPLETE,
|
SERVER_CHANGECIPHERSPEC_COMPLETE,
|
||||||
SERVER_FINISHED_COMPLETE,
|
SERVER_FINISHED_COMPLETE,
|
||||||
|
|
||||||
|
CLIENT_HELLO_RETRY,
|
||||||
CLIENT_HELLO_COMPLETE,
|
CLIENT_HELLO_COMPLETE,
|
||||||
CLIENT_KEYEXCHANGE_COMPLETE,
|
CLIENT_KEYEXCHANGE_COMPLETE,
|
||||||
CLIENT_CHANGECIPHERSPEC_COMPLETE,
|
CLIENT_CHANGECIPHERSPEC_COMPLETE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user