Allow the server to send supported groups extension in TLS 1.3

This commit is contained in:
Anthony Hu
2023-09-28 10:17:05 -04:00
parent aedebac649
commit 7c1cc5e8f9

View File

@ -4183,7 +4183,7 @@ static void TLSX_PointFormat_ValidateResponse(WOLFSSL* ssl, byte* semaphore)
#endif /* !NO_WOLFSSL_SERVER */ #endif /* !NO_WOLFSSL_SERVER */
#ifndef NO_WOLFSSL_CLIENT #if !defined(NO_WOLFSSL_CLIENT) || defined(WOLFSSL_TLS13)
static word16 TLSX_SupportedCurve_GetSize(SupportedCurve* list) static word16 TLSX_SupportedCurve_GetSize(SupportedCurve* list)
{ {
@ -4213,7 +4213,7 @@ static word16 TLSX_PointFormat_GetSize(PointFormat* list)
return length; return length;
} }
#ifndef NO_WOLFSSL_CLIENT #if !defined(NO_WOLFSSL_CLIENT) || defined(WOLFSSL_TLS13)
static word16 TLSX_SupportedCurve_Write(SupportedCurve* list, byte* output) static word16 TLSX_SupportedCurve_Write(SupportedCurve* list, byte* output)
{ {
@ -5108,7 +5108,10 @@ int TLSX_UsePointFormat(TLSX** extensions, byte format, void* heap)
#define EC_FREE_ALL TLSX_SupportedCurve_FreeAll #define EC_FREE_ALL TLSX_SupportedCurve_FreeAll
#define EC_VALIDATE_REQUEST TLSX_SupportedCurve_ValidateRequest #define EC_VALIDATE_REQUEST TLSX_SupportedCurve_ValidateRequest
#ifndef NO_WOLFSSL_CLIENT /* In TLS 1.2 the server never sends supported curve extension, but in TLS 1.3
* the server can send supported groups extension to indicate what it will
* support for later connections. */
#if !defined(NO_WOLFSSL_CLIENT) || defined(WOLFSSL_TLS13)
#define EC_GET_SIZE TLSX_SupportedCurve_GetSize #define EC_GET_SIZE TLSX_SupportedCurve_GetSize
#define EC_WRITE TLSX_SupportedCurve_Write #define EC_WRITE TLSX_SupportedCurve_Write
#else #else