1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

mki length feats in a uint16_t

Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
Johan Pascal
2020-09-22 15:15:19 +02:00
parent 253d0263a6
commit f6417ecf60
4 changed files with 9 additions and 11 deletions

View File

@ -761,10 +761,8 @@ static void ssl_write_use_srtp_ext( mbedtls_ssl_context *ssl,
unsigned char *buf, size_t *olen )
{
unsigned char *p = buf;
size_t protection_profiles_index = 0;
size_t mki_len = 0;
size_t ext_len = 0;
uint16_t profile_value = 0;
size_t protection_profiles_index = 0, ext_len = 0;
uint16_t mki_len = 0, profile_value = 0;
*olen = 0;
@ -1843,8 +1841,7 @@ static int ssl_parse_use_srtp_ext( mbedtls_ssl_context *ssl,
* SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
*
*/
if( ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED &&
ssl->dtls_srtp_info.mki_len != 0 )
if( ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED )
{
mki_len = ssl->dtls_srtp_info.mki_len;
}