Skip to content

Conversation

@ajay-sabat
Copy link
Contributor

Comparing the user given cypto type string to both name and alias of the default crypto suites supported by the system.

Comparing the user given cypto type string to both name and alias of the default crypto suites supported by the system.
@andywolk andywolk changed the title Fix [switch_core_media.c]: SRTP media crypto keys are not working [Core] switch_core_session_parse_crypto_prefs: check match with suite alias as well Nov 16, 2020
@andywolk andywolk self-requested a review November 16, 2020 22:22
@andywolk andywolk added the bug Something isn't working label Nov 16, 2020

for (j = 0; j < CRYPTO_INVALID; j++) {
if (!strcasecmp(fields[i], SUITES[j].name)) {
if (!strcasecmp(fields[i], SUITES[j].name) || !strcasecmp(fields[i], SUITES[j].alias)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use switch_core_media_crypto_str2type() here instead of the whole block?

@Five9Voice
Copy link

This page defines cyptro suites: https://freeswitch.org/confluence/display/FREESWITCH/rtp_secure_media. Some of the encryption suite entries are aliases, some are not aliases.

For a TLS/SRTP call, if the user specifies a crypto suite that is an alias from the list mentioned in the document negotiation will fail. This patch allows the user to specify either an encryption suite name OR and alias.

@andywolk
Copy link
Contributor

@Five9Voice Please resolve the requested change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants