mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-05-17 23:15:58 +08: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:
@ -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
|
||||
|
Reference in New Issue
Block a user