32 #define TRACE_LEVEL TLS_TRACE_LEVEL
44 #if (TLS_SUPPORT == ENABLED)
112 n =
ntohs(extension->length);
144 if(supportedVersionList->length == 0)
146 if((supportedVersionList->length % 2) != 0)
150 extensions->supportedVersionList = supportedVersionList;
156 if(
n !=
sizeof(uint16_t))
192 if(
ntohs(serverNameList->length) == 0)
213 if(
ntohs(supportedGroupList->length) == 0)
215 if((
ntohs(supportedGroupList->length) % 2) != 0)
219 extensions->supportedGroupList = supportedGroupList;
235 if(
ntohs(ecPointFormatList->length) == 0)
239 extensions->ecPointFormatList = ecPointFormatList;
255 if(
ntohs(signAlgoList->length) == 0)
257 if((
ntohs(signAlgoList->length) % 2) != 0)
277 if(
ntohs(certSignAlgoList->length) == 0)
279 if((
ntohs(certSignAlgoList->length) % 2) != 0)
283 extensions->certSignAlgoList = certSignAlgoList;
285 #if (TLS_MAX_FRAG_LEN_SUPPORT == ENABLED)
289 if(
n !=
sizeof(uint8_t))
296 #if (TLS_RECORD_SIZE_LIMIT_SUPPORT == ENABLED)
300 if(
n !=
sizeof(uint16_t))
307 #if (TLS_ALPN_SUPPORT == ENABLED)
322 extensions->protocolNameList = protocolNameList;
325 #if (TLS_RAW_PUBLIC_KEY_SUPPORT == ENABLED)
343 extensions->clientCertTypeList = clientCertTypeList;
349 if(
n !=
sizeof(uint8_t))
373 extensions->serverCertTypeList = serverCertTypeList;
379 if(
n !=
sizeof(uint8_t))
387 #if (TLS_ENCRYPT_THEN_MAC_SUPPORT == ENABLED)
399 #if (TLS_EXT_MASTER_SECRET_SUPPORT == ENABLED)
410 #if (TLS_TICKET_SUPPORT == ENABLED)
426 #if (TLS_SECURE_RENEGOTIATION_SUPPORT == ENABLED)
444 #if (TLS_MAX_VERSION >= TLS_VERSION_1_3 && TLS_MIN_VERSION <= TLS_VERSION_1_3)
479 if(
ntohs(certAuthorities->length) < 3)
483 extensions->certAuthorities = certAuthorities;
506 p = keyShareList->value;
508 m =
ntohs(keyShareList->length);
520 k =
ntohs(keyShareEntry->length);
548 if(
n !=
sizeof(uint16_t))
574 #if (TLS_MAX_EMPTY_RECORDS > 0)
644 if(
n !=
sizeof(uint16_t))
669 if(
n !=
sizeof(uint32_t))
718 #if (TLS_MAX_FRAG_LEN_SUPPORT == ENABLED && TLS_RECORD_SIZE_LIMIT_SUPPORT == ENABLED)
733 #if (TLS_MAX_VERSION >= TLS_VERSION_1_3 && TLS_MIN_VERSION <= TLS_VERSION_1_3)
740 if(
extensions->supportedVersionList != NULL ||
806 #if (TLS_MAX_FRAG_LEN_SUPPORT == ENABLED)
819 #if (TLS_RECORD_SIZE_LIMIT_SUPPORT == ENABLED)
832 #if (TLS_ALPN_SUPPORT == ENABLED)
845 #if (TLS_RAW_PUBLIC_KEY_SUPPORT == ENABLED)
871 #if (TLS_ENCRYPT_THEN_MAC_SUPPORT == ENABLED)
883 #if (TLS_EXT_MASTER_SECRET_SUPPORT == ENABLED)
895 #if (TLS_TICKET_SUPPORT == ENABLED)
907 #if (TLS_SECURE_RENEGOTIATION_SUPPORT == ENABLED)
1082 n =
ntohs(extension->length);
1111 #if (TLS_ALPN_SUPPORT == ENABLED)
1113 if(context->protocolList != NULL)
1126 if(context->protocolList[i] ==
',' || context->protocolList[i] ==
'\0')
1146 }
while(context->protocolList[i++] !=
'\0');