forked from wolfSSL/wolfssl
Send EMS extension in ClientHello when downgradable from TLSv1.3
This commit is contained in:
@ -9382,7 +9382,7 @@ int TLSX_GetRequestSize(WOLFSSL* ssl, byte msgType, word16* pLength)
|
||||
|
||||
#ifdef HAVE_EXTENDED_MASTER
|
||||
if (msgType == client_hello && ssl->options.haveEMS &&
|
||||
!IsAtLeastTLSv1_3(ssl->version)) {
|
||||
(!IsAtLeastTLSv1_3(ssl->version) || ssl->options.downgrade)) {
|
||||
length += HELLO_EXT_SZ;
|
||||
}
|
||||
#endif
|
||||
@ -9483,7 +9483,8 @@ int TLSX_WriteRequest(WOLFSSL* ssl, byte* output, byte msgType, word16* pOffset)
|
||||
|
||||
#ifdef HAVE_EXTENDED_MASTER
|
||||
if (msgType == client_hello && ssl->options.haveEMS &&
|
||||
!IsAtLeastTLSv1_3(ssl->version)) {
|
||||
(!IsAtLeastTLSv1_3(ssl->version) || ssl->options.downgrade)) {
|
||||
WOLFSSL_MSG("EMS extension to write");
|
||||
c16toa(HELLO_EXT_EXTMS, output + offset);
|
||||
offset += HELLO_EXT_TYPE_SZ;
|
||||
c16toa(0, output + offset);
|
||||
@ -9728,6 +9729,7 @@ int TLSX_WriteResponse(WOLFSSL *ssl, byte* output, byte msgType, word16* pOffset
|
||||
#ifdef HAVE_EXTENDED_MASTER
|
||||
if (ssl->options.haveEMS && msgType == server_hello &&
|
||||
!IsAtLeastTLSv1_3(ssl->version)) {
|
||||
WOLFSSL_MSG("EMS extension to write");
|
||||
c16toa(HELLO_EXT_EXTMS, output + offset);
|
||||
offset += HELLO_EXT_TYPE_SZ;
|
||||
c16toa(0, output + offset);
|
||||
|
Reference in New Issue
Block a user