1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +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

@@ -4751,10 +4751,16 @@ int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf,
return( 0 );
}
const mbedtls_dtls_srtp_info *
mbedtls_dtls_srtp_info
mbedtls_ssl_get_dtls_srtp_negotiation_result( const mbedtls_ssl_context *ssl )
{
return( &( ssl->dtls_srtp_info ) );
mbedtls_dtls_srtp_info ret = ssl->dtls_srtp_info;
/* discard the mki if there is no chosen profile */
if ( ret.chosen_dtls_srtp_profile == MBEDTLS_TLS_SRTP_UNSET )
{
ret.mki_len = 0;
}
return( ret );
}
#endif /* MBEDTLS_SSL_DTLS_SRTP */