diff --git a/src/ssl.c b/src/ssl.c index 25fbdfba9..8161249cf 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1329,7 +1329,7 @@ static int DtlsSrtpSelProfiles(word16* id, const char* profile_str) const WOLFSSL_SRTP_PROTECTION_PROFILE* profile; const char *current, *next = NULL; word32 length = 0, current_length; - + *id = 0; /* reset destination ID's */ if (profile_str == NULL) { diff --git a/src/tls.c b/src/tls.c index fd7304262..f9dc7d345 100644 --- a/src/tls.c +++ b/src/tls.c @@ -5434,7 +5434,7 @@ static int TLSX_UseSRTP_Parse(WOLFSSL* ssl, const byte* input, word16 length, ato16(input + offset, &profile_value); /* check that the profile received was in the ones we support */ - if (profile_value < 16 && + if (profile_value < 16 && (ssl->dtlsSrtpProfiles & (1 << profile_value))) { ssl->dtlsSrtpId = profile_value; ret = 0; /* success */ @@ -5448,7 +5448,7 @@ static int TLSX_UseSRTP_Parse(WOLFSSL* ssl, const byte* input, word16 length, for (i=offset; idtlsSrtpProfiles & (1 << profile_value)) { ssl->dtlsSrtpId = profile_value; diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index ec89cfda9..e01abd32a 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -1315,7 +1315,7 @@ typedef struct WOLFSSL_SRTP_PROTECTION_PROFILE { /* Compatibility API's for SRTP */ WOLFSSL_API int wolfSSL_CTX_set_tlsext_use_srtp(WOLFSSL_CTX*, const char*); WOLFSSL_API int wolfSSL_set_tlsext_use_srtp(WOLFSSL*, const char*); -WOLFSSL_API const WOLFSSL_SRTP_PROTECTION_PROFILE* +WOLFSSL_API const WOLFSSL_SRTP_PROTECTION_PROFILE* wolfSSL_get_selected_srtp_profile(WOLFSSL*); WOLFSSL_API WOLF_STACK_OF(WOLFSSL_SRTP_PROTECTION_PROFILE)* wolfSSL_get_srtp_profiles(WOLFSSL*);