Merge pull request #4137 from SparkiDev/tls13_hrr_ch_ems

TLS EMS ext: TLS13 - send in second CH if in first
This commit is contained in:
David Garske
2021-06-17 07:29:19 -07:00
committed by GitHub

View File

@ -11625,7 +11625,12 @@ int TLSX_Parse(WOLFSSL* ssl, const byte* input, word16 length, byte msgType,
}
#ifdef HAVE_EXTENDED_MASTER
if (!isRequest && ssl->options.haveEMS && !pendingEMS)
if (IsAtLeastTLSv1_3(ssl->version) && msgType == hello_retry_request) {
/* Don't change EMS status until server_hello received.
* Second ClientHello must have same extensions.
*/
}
else if (!isRequest && ssl->options.haveEMS && !pendingEMS)
ssl->options.haveEMS = 0;
#endif