1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

Style + fix bound check in write_use_srt_ext

Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
Johan Pascal
2020-09-22 10:39:53 +02:00
parent 9bc97ca19d
commit d576fdb1d6
4 changed files with 26 additions and 23 deletions

View File

@@ -4751,12 +4751,12 @@ int mbedtls_ssl_dtls_srtp_set_mki_value( mbedtls_ssl_context *ssl,
{
if ( mki_len > MBEDTLS_TLS_SRTP_MAX_MKI_LENGTH )
{
return MBEDTLS_ERR_SSL_BAD_INPUT_DATA;
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
}
if( ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_UNSUPPORTED )
{
return MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE;
return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
}
memcpy( ssl->dtls_srtp_info.mki_value, mki_value, mki_len );
@@ -4779,8 +4779,10 @@ int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf,
}
for( i=0; i < profiles_number; i++ ) {
switch( profiles[i] ) {
for( i=0; i < profiles_number; i++ )
{
switch( profiles[i] )
{
case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80:
case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32:
case MBEDTLS_SRTP_NULL_HMAC_SHA1_80: