Skip to content

Commit 7c1cc5e

Browse files
committed
Allow the server to send supported groups extension in TLS 1.3
1 parent aedebac commit 7c1cc5e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/tls.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,7 +4183,7 @@ static void TLSX_PointFormat_ValidateResponse(WOLFSSL* ssl, byte* semaphore)
41834183

41844184
#endif /* !NO_WOLFSSL_SERVER */
41854185

4186-
#ifndef NO_WOLFSSL_CLIENT
4186+
#if !defined(NO_WOLFSSL_CLIENT) || defined(WOLFSSL_TLS13)
41874187

41884188
static word16 TLSX_SupportedCurve_GetSize(SupportedCurve* list)
41894189
{
@@ -4213,7 +4213,7 @@ static word16 TLSX_PointFormat_GetSize(PointFormat* list)
42134213
return length;
42144214
}
42154215

4216-
#ifndef NO_WOLFSSL_CLIENT
4216+
#if !defined(NO_WOLFSSL_CLIENT) || defined(WOLFSSL_TLS13)
42174217

42184218
static word16 TLSX_SupportedCurve_Write(SupportedCurve* list, byte* output)
42194219
{
@@ -5108,7 +5108,10 @@ int TLSX_UsePointFormat(TLSX** extensions, byte format, void* heap)
51085108
#define EC_FREE_ALL TLSX_SupportedCurve_FreeAll
51095109
#define EC_VALIDATE_REQUEST TLSX_SupportedCurve_ValidateRequest
51105110

5111-
#ifndef NO_WOLFSSL_CLIENT
5111+
/* In TLS 1.2 the server never sends supported curve extension, but in TLS 1.3
5112+
* the server can send supported groups extension to indicate what it will
5113+
* support for later connections. */
5114+
#if !defined(NO_WOLFSSL_CLIENT) || defined(WOLFSSL_TLS13)
51125115
#define EC_GET_SIZE TLSX_SupportedCurve_GetSize
51135116
#define EC_WRITE TLSX_SupportedCurve_Write
51145117
#else

0 commit comments

Comments
 (0)