mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-02 03:24:22 +01:00
style + missing cast
Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
parent
842d671316
commit
d387aa0586
@ -3232,6 +3232,7 @@ void mbedtls_ssl_conf_srtp_mki_value_supported( mbedtls_ssl_config *conf,
|
|||||||
* of the SSL configuration structure.
|
* of the SSL configuration structure.
|
||||||
* The list must not hold more than
|
* The list must not hold more than
|
||||||
* MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH elements
|
* MBEDTLS_TLS_SRTP_MAX_PROFILE_LIST_LENGTH elements
|
||||||
|
* (excluding the terminating MBEDTLS_TLS_SRTP_UNSET).
|
||||||
*
|
*
|
||||||
* \return 0 on success
|
* \return 0 on success
|
||||||
* \return #MBEDTLS_ERR_SSL_BAD_INPUT_DATA when the list of
|
* \return #MBEDTLS_ERR_SSL_BAD_INPUT_DATA when the list of
|
||||||
|
@ -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,
|
/* check the profiles list: all entry must be valid,
|
||||||
* its size cannot be more than the total number of supported profiles, currently 4 */
|
* 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 )
|
switch( *p )
|
||||||
{
|
{
|
||||||
@ -4734,11 +4736,12 @@ int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf,
|
|||||||
list_size++;
|
list_size++;
|
||||||
break;
|
break;
|
||||||
default: /* unsupported value, stop parsing and set the size to an error value */
|
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 = NULL;
|
||||||
conf->dtls_srtp_profile_list_len = 0;
|
conf->dtls_srtp_profile_list_len = 0;
|
||||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||||
|
@ -2614,7 +2614,7 @@ int main( int argc, char *argv[] )
|
|||||||
|
|
||||||
mbedtls_ssl_conf_srtp_mki_value_supported( &conf, MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED );
|
mbedtls_ssl_conf_srtp_mki_value_supported( &conf, MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED );
|
||||||
if( ( ret = mbedtls_ssl_dtls_srtp_set_mki_value( &ssl, mki,
|
if( ( ret = mbedtls_ssl_dtls_srtp_set_mki_value( &ssl, mki,
|
||||||
strlen( opt.mki ) / 2 ) ) != 0 )
|
(uint16_t) strlen( opt.mki ) / 2 ) ) != 0 )
|
||||||
{
|
{
|
||||||
mbedtls_printf( " failed\n ! mbedtls_ssl_dtls_srtp_set_mki_value returned %d\n\n", ret );
|
mbedtls_printf( " failed\n ! mbedtls_ssl_dtls_srtp_set_mki_value returned %d\n\n", ret );
|
||||||
goto exit;
|
goto exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user