mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 00:37:44 -04:00
Update network_transport files based on MbedTLSv3.6.3 (#1340)
Update network_transport files based on MbedTLSv3.6.3
This commit is contained in:
parent
1325aaaad6
commit
0cbfaab47d
2 changed files with 25 additions and 13 deletions
|
@ -462,6 +462,13 @@ static void setOptionalConfigurations( SSLContext_t * pSslContext,
|
|||
{
|
||||
mbedtlsError = mbedtls_ssl_set_hostname( &( pSslContext->context ),
|
||||
pHostName );
|
||||
}
|
||||
/* MbedTLS-3.6.3 requires calling the mbedtls_ssl_set_hostname() before calling mbedtls_ssl_handshake(). */
|
||||
else
|
||||
{
|
||||
mbedtlsError = mbedtls_ssl_set_hostname( &( pSslContext->context ),
|
||||
NULL );
|
||||
}
|
||||
|
||||
if( mbedtlsError != 0 )
|
||||
{
|
||||
|
@ -469,7 +476,6 @@ static void setOptionalConfigurations( SSLContext_t * pSslContext,
|
|||
mbedtlsHighLevelCodeOrDefault( mbedtlsError ),
|
||||
mbedtlsLowLevelCodeOrDefault( mbedtlsError ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* Set Maximum Fragment Length if enabled. */
|
||||
#ifdef MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
|
|
|
@ -463,6 +463,13 @@ static TlsTransportStatus_t tlsSetup( NetworkContext_t * pNetworkContext,
|
|||
{
|
||||
mbedtlsError = mbedtls_ssl_set_hostname( &( pTlsTransportParams->sslContext.context ),
|
||||
pHostName );
|
||||
}
|
||||
/* MbedTLS-3.6.3 requires calling the mbedtls_ssl_set_hostname() before calling mbedtls_ssl_handshake(). */
|
||||
else
|
||||
{
|
||||
mbedtlsError = mbedtls_ssl_set_hostname( &( pTlsTransportParams->sslContext.context ),
|
||||
NULL );
|
||||
}
|
||||
|
||||
if( mbedtlsError != 0 )
|
||||
{
|
||||
|
@ -473,7 +480,6 @@ static TlsTransportStatus_t tlsSetup( NetworkContext_t * pNetworkContext,
|
|||
returnStatus = TLS_TRANSPORT_INTERNAL_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Set Maximum Fragment Length if enabled. */
|
||||
#ifdef MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue