mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
set protection profile API gets a MBEDTLS_TLS_SRTP_UNSET terminated list
Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
@ -1249,7 +1249,8 @@ int main( int argc, char *argv[] )
|
||||
MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_80,
|
||||
MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_32,
|
||||
MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_80,
|
||||
MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32
|
||||
MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32,
|
||||
MBEDTLS_TLS_SRTP_UNSET
|
||||
};
|
||||
#endif /* MBEDTLS_SSL_DTLS_SRTP */
|
||||
#endif /* MBEDTLS_SSL_EXPORT_KEYS */
|
||||
@ -2334,18 +2335,12 @@ int main( int argc, char *argv[] )
|
||||
{
|
||||
if( opt.force_srtp_profile != 0 )
|
||||
{
|
||||
const mbedtls_ssl_srtp_profile forced_profile[] = { opt.force_srtp_profile };
|
||||
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles
|
||||
( &conf,
|
||||
forced_profile,
|
||||
sizeof( forced_profile ) / sizeof( mbedtls_ssl_srtp_profile ) );
|
||||
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 );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles
|
||||
( &conf,
|
||||
default_profiles,
|
||||
sizeof( default_profiles ) / sizeof( mbedtls_ssl_srtp_profile ) );
|
||||
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles ( &conf, default_profiles );
|
||||
}
|
||||
|
||||
if( ret != 0 )
|
||||
|
Reference in New Issue
Block a user