1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Make API safer

Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
Johan Pascal
2020-10-28 11:03:07 +01:00
parent 275874bc47
commit 0dbcd1d3f0
4 changed files with 19 additions and 16 deletions

View File

@ -3865,10 +3865,10 @@ handshake:
else if( opt.use_srtp != 0 )
{
size_t j = 0;
const mbedtls_dtls_srtp_info *dtls_srtp_negotiation_result =
mbedtls_dtls_srtp_info dtls_srtp_negotiation_result =
mbedtls_ssl_get_dtls_srtp_negotiation_result( &ssl );
if( ( dtls_srtp_negotiation_result->chosen_dtls_srtp_profile
if( ( dtls_srtp_negotiation_result.chosen_dtls_srtp_profile
== MBEDTLS_TLS_SRTP_UNSET ) )
{
mbedtls_printf( " Unable to negotiate "
@ -3911,12 +3911,12 @@ handshake:
}
mbedtls_printf( "\n" );
if ( dtls_srtp_negotiation_result->mki_len > 0 )
if ( dtls_srtp_negotiation_result.mki_len > 0 )
{
mbedtls_printf( " DTLS-SRTP mki value: " );
for( j = 0; j < dtls_srtp_negotiation_result->mki_len; j++ )
for( j = 0; j < dtls_srtp_negotiation_result.mki_len; j++ )
{
mbedtls_printf( "%02X", dtls_srtp_negotiation_result->mki_value[j] );
mbedtls_printf( "%02X", dtls_srtp_negotiation_result.mki_value[j] );
}
}
else