mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
Merge pull request #1304 in FS/freeswitch from ~TREVORA/freeswitch:bugfix/FS-10370-enable-padding-for-srtp-keys to master
* commit '09174819a9a2a69d89aaafe25470d567a73d7bc6': FS-10370: Enable SRTP Key Padding
This commit is contained in:
commit
fa0edd81ba
@ -1173,10 +1173,12 @@ static switch_status_t switch_core_media_build_crypto(switch_media_handle_t *smh
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch_b64_encode(key, SUITES[ctype].keylen, b64_key, sizeof(b64_key));
|
switch_b64_encode(key, SUITES[ctype].keylen, b64_key, sizeof(b64_key));
|
||||||
p = strrchr((char *) b64_key, '=');
|
if (!switch_channel_var_true(channel, "rtp_pad_srtp_keys")) {
|
||||||
|
p = strrchr((char *) b64_key, '=');
|
||||||
|
|
||||||
while (p && *p && *p == '=') {
|
while (p && *p && *p == '=') {
|
||||||
*p-- = '\0';
|
*p-- = '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index == SWITCH_NO_CRYPTO_TAG) index = ctype + 1;
|
if (index == SWITCH_NO_CRYPTO_TAG) index = ctype + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user