Merge pull request #546 in FS/freeswitch from ~COREY BURKE/freeswitch:feature/FS-8281-expose-srtp-and-srtcp-crypto-keys to master

* commit '0316fdfcf1d2a72d1bad5dc9646371159173f93f':
  FS-8281: Expose SRTP and SRTCP crypto keys as channel vars
This commit is contained in:
Mike Jerris
2015-10-27 19:13:25 -05:00
3 changed files with 35 additions and 1 deletions

View File

@@ -2300,9 +2300,15 @@ static void switch_load_core_config(const char *file)
} else if (!strcasecmp(var, "rtp-enable-zrtp")) {
switch_core_set_variable("zrtp_enabled", val);
#endif
} else if (!strcasecmp(var, "switchname") && !zstr(val)) {
} else if (!strcasecmp(var, "switchname") && !zstr(val)) {
runtime.switchname = switch_core_strdup(runtime.memory_pool, val);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Set switchname to %s\n", runtime.switchname);
} else if (!strcasecmp(var, "rtp-retain-crypto-keys")) {
if (switch_true(val)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"rtp-retain-crypto-keys enabled. Could be used to decrypt secure media.\n");
}
switch_core_set_variable("rtp_retain_crypto_keys", val);
}
}
}