mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
style + missing cast
Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
@@ -4723,7 +4723,9 @@ int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf,
|
||||
|
||||
/* check the profiles list: all entry must be valid,
|
||||
* its size cannot be more than the total number of supported profiles, currently 4 */
|
||||
for( p = profiles; *p != MBEDTLS_TLS_SRTP_UNSET && list_size <= MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH; p++ )
|
||||
for( p = profiles; *p != MBEDTLS_TLS_SRTP_UNSET &&
|
||||
list_size <= MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH;
|
||||
p++ )
|
||||
{
|
||||
switch( *p )
|
||||
{
|
||||
@@ -4731,14 +4733,15 @@ int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf,
|
||||
case MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_32:
|
||||
case MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_80:
|
||||
case MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32:
|
||||
list_size++;
|
||||
list_size++;
|
||||
break;
|
||||
default: /* unsupported value, stop parsing and set the size to an error value */
|
||||
list_size = MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH+1;
|
||||
list_size = MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( list_size > MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH ) {
|
||||
if ( list_size > MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH )
|
||||
{
|
||||
conf->dtls_srtp_profile_list = NULL;
|
||||
conf->dtls_srtp_profile_list_len = 0;
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
|
Reference in New Issue
Block a user