Style and typos

Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
Johan Pascal 2020-10-28 17:05:47 +01:00
parent 2258a4f481
commit 5ef72d214f
6 changed files with 21 additions and 17 deletions

View file

@ -1909,7 +1909,8 @@ static int ssl_parse_use_srtp_ext( mbedtls_ssl_context *ssl,
*/ */
for( i=0; i < ssl->conf->dtls_srtp_profile_list_len; i++) for( i=0; i < ssl->conf->dtls_srtp_profile_list_len; i++)
{ {
if( server_protection == ssl->conf->dtls_srtp_profile_list[i] ) { if( server_protection == ssl->conf->dtls_srtp_profile_list[i] )
{
ssl->dtls_srtp_info.chosen_dtls_srtp_profile = ssl->conf->dtls_srtp_profile_list[i]; ssl->dtls_srtp_info.chosen_dtls_srtp_profile = ssl->conf->dtls_srtp_profile_list[i];
MBEDTLS_SSL_DEBUG_MSG( 3, ( "selected srtp profile: %s", MBEDTLS_SSL_DEBUG_MSG( 3, ( "selected srtp profile: %s",
mbedtls_ssl_get_srtp_profile_as_string( mbedtls_ssl_get_srtp_profile_as_string(

View file

@ -4751,7 +4751,8 @@ int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf,
return( 0 ); return( 0 );
} }
void mbedtls_ssl_get_dtls_srtp_negotiation_result( const mbedtls_ssl_context *ssl, mbedtls_dtls_srtp_info *dtls_srtp_info ) void mbedtls_ssl_get_dtls_srtp_negotiation_result( const mbedtls_ssl_context *ssl,
mbedtls_dtls_srtp_info *dtls_srtp_info )
{ {
dtls_srtp_info->chosen_dtls_srtp_profile = ssl->dtls_srtp_info.chosen_dtls_srtp_profile; dtls_srtp_info->chosen_dtls_srtp_profile = ssl->dtls_srtp_info.chosen_dtls_srtp_profile;
/* do not copy the mki value if there is no chosen profile */ /* do not copy the mki value if there is no chosen profile */
@ -4762,7 +4763,8 @@ void mbedtls_ssl_get_dtls_srtp_negotiation_result( const mbedtls_ssl_context *ss
else else
{ {
dtls_srtp_info->mki_len = ssl->dtls_srtp_info.mki_len; dtls_srtp_info->mki_len = ssl->dtls_srtp_info.mki_len;
memcpy( dtls_srtp_info->mki_value, ssl->dtls_srtp_info.mki_value, ssl->dtls_srtp_info.mki_len ); memcpy( dtls_srtp_info->mki_value, ssl->dtls_srtp_info.mki_value,
ssl->dtls_srtp_info.mki_len );
} }
} }
#endif /* MBEDTLS_SSL_DTLS_SRTP */ #endif /* MBEDTLS_SSL_DTLS_SRTP */

View file

@ -2341,7 +2341,8 @@ int main( int argc, char *argv[] )
{ {
if( opt.force_srtp_profile != 0 ) if( opt.force_srtp_profile != 0 )
{ {
const mbedtls_ssl_srtp_profile forced_profile[] = { opt.force_srtp_profile, MBEDTLS_TLS_SRTP_UNSET }; const mbedtls_ssl_srtp_profile forced_profile[] =
{ opt.force_srtp_profile, MBEDTLS_TLS_SRTP_UNSET };
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles ( &conf, forced_profile ); ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles ( &conf, forced_profile );
} }
else else
@ -2810,7 +2811,7 @@ int main( int argc, char *argv[] )
} }
else else
{ {
mbedtls_printf( " DTLS-SRTP no mki value negociated" ); mbedtls_printf( " DTLS-SRTP no mki value negotiated" );
} }
mbedtls_printf( "\n" ); mbedtls_printf( "\n" );
} }

View file

@ -3921,7 +3921,7 @@ handshake:
} }
else else
{ {
mbedtls_printf( " DTLS-SRTP no mki value negociated" ); mbedtls_printf( " DTLS-SRTP no mki value negotiated" );
} }
mbedtls_printf( "\n" ); mbedtls_printf( "\n" );

View file

@ -8875,14 +8875,14 @@ run_test "DTLS-SRTP all profiles supported. server doesn't support mki." \
-s "selected srtp profile" \ -s "selected srtp profile" \
-s "server hello, adding use_srtp extension" \ -s "server hello, adding use_srtp extension" \
-s "DTLS-SRTP key material is"\ -s "DTLS-SRTP key material is"\
-s "DTLS-SRTP no mki value negociated"\ -s "DTLS-SRTP no mki value negotiated"\
-S "dumping 'using mki' (8 bytes)" \ -S "dumping 'using mki' (8 bytes)" \
-c "client hello, adding use_srtp extension" \ -c "client hello, adding use_srtp extension" \
-c "found use_srtp extension" \ -c "found use_srtp extension" \
-c "found srtp profile" \ -c "found srtp profile" \
-c "selected srtp profile" \ -c "selected srtp profile" \
-c "DTLS-SRTP key material is"\ -c "DTLS-SRTP key material is"\
-c "DTLS-SRTP no mki value negociated"\ -c "DTLS-SRTP no mki value negotiated"\
-g "find_in_both '^ *Keying material: [0-9A-F]*$'"\ -g "find_in_both '^ *Keying material: [0-9A-F]*$'"\
-c "dumping 'sending mki' (8 bytes)" \ -c "dumping 'sending mki' (8 bytes)" \
-C "dumping 'received mki' (8 bytes)" \ -C "dumping 'received mki' (8 bytes)" \
@ -9069,7 +9069,7 @@ run_test "DTLS-SRTP all profiles supported. server doesn't support mki. openssl
-c "found srtp profile" \ -c "found srtp profile" \
-c "selected srtp profile" \ -c "selected srtp profile" \
-c "DTLS-SRTP key material is"\ -c "DTLS-SRTP key material is"\
-c "DTLS-SRTP no mki value negociated"\ -c "DTLS-SRTP no mki value negotiated"\
-c "dumping 'sending mki' (8 bytes)" \ -c "dumping 'sending mki' (8 bytes)" \
-C "dumping 'received mki' (8 bytes)" \ -C "dumping 'received mki' (8 bytes)" \
-C "error" -C "error"