Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
03d8aa4e
提交
03d8aa4e
authored
12月 20, 2017
作者:
Piotr Gregor
提交者:
Muteesa Fred
7月 24, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10853: Fix failed build for mod_dingaling
Fixes build but must be tested at runtime.
上级
63f3531c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
15 行删除
+22
-15
switch_core_media.h
src/include/switch_core_media.h
+3
-1
mod_dingaling.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
+12
-13
switch_core_media.c
src/switch_core_media.c
+7
-1
没有找到文件。
src/include/switch_core_media.h
浏览文件 @
03d8aa4e
...
...
@@ -210,6 +210,7 @@ SWITCH_DECLARE(void) switch_core_media_set_rtp_session(switch_core_session_t *se
SWITCH_DECLARE
(
const
char
*
)
switch_core_media_get_codec_string
(
switch_core_session_t
*
session
);
SWITCH_DECLARE
(
void
)
switch_core_media_parse_rtp_bugs
(
switch_rtp_bug_flag_t
*
flag_pole
,
const
char
*
str
);
SWITCH_DECLARE
(
switch_status_t
)
switch_core_media_add_crypto
(
switch_core_session_t
*
session
,
switch_secure_settings_t
*
ssec
,
switch_rtp_crypto_direction_t
direction
);
SWITCH_DECLARE
(
switch_t38_options_t
*
)
switch_core_media_extract_t38_options
(
switch_core_session_t
*
session
,
const
char
*
r_sdp
);
SWITCH_DECLARE
(
void
)
switch_core_media_pass_zrtp_hash
(
switch_core_session_t
*
session
);
SWITCH_DECLARE
(
const
char
*
)
switch_core_media_get_zrtp_hash
(
switch_core_session_t
*
session
,
switch_media_type_t
type
,
switch_bool_t
local
);
...
...
@@ -309,7 +310,8 @@ SWITCH_DECLARE(payload_map_t *) switch_core_media_add_payload_map(switch_core_se
SWITCH_DECLARE
(
switch_status_t
)
switch_core_media_check_autoadj
(
switch_core_session_t
*
session
);
SWITCH_DECLARE
(
switch_rtp_crypto_key_type_t
)
switch_core_media_crypto_str2type
(
const
char
*
str
);
SWITCH_DECLARE
(
const
char
*
)
switch_core_media_crypto_type2str
(
switch_rtp_crypto_key_type_t
type
);
SWITCH_DECLARE
(
int
)
switch_core_media_crypto_keylen
(
switch_rtp_crypto_key_type_t
type
);
SWITCH_DECLARE
(
int
)
switch_core_media_crypto_keysalt_len
(
switch_rtp_crypto_key_type_t
type
);
SWITCH_DECLARE
(
int
)
switch_core_media_crypto_salt_len
(
switch_rtp_crypto_key_type_t
type
);
SWITCH_DECLARE
(
char
*
)
switch_core_media_filter_sdp
(
const
char
*
sdp
,
const
char
*
cmd
,
const
char
*
arg
);
SWITCH_DECLARE
(
char
*
)
switch_core_media_process_sdp_filter
(
const
char
*
sdp
,
const
char
*
cmd_buf
,
switch_core_session_t
*
session
);
...
...
src/mod/endpoints/mod_dingaling/mod_dingaling.c
浏览文件 @
03d8aa4e
...
...
@@ -255,7 +255,6 @@ struct rfc2833_digit {
int
duration
;
};
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_string
,
globals
.
codec_string
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_rates_string
,
globals
.
codec_rates_string
);
...
...
@@ -1102,35 +1101,35 @@ static switch_status_t mdl_add_crypto(struct private_object *tech_pvt,
static
void
try_secure
(
struct
private_object
*
tech_pvt
,
ldl_transport_type_t
ttype
)
{
switch_secure_settings_t
ssec
;
/* Used just to wrap over params in a call to switch_rtp_add_crypto_key. */
if
(
!
switch_test_flag
(
tech_pvt
,
TFLAG_SECURE
))
{
return
;
}
memset
(
&
ssec
,
0
,
sizeof
(
ssec
));
if
(
tech_pvt
->
transports
[
ttype
].
crypto_recv_type
)
{
tech_pvt
->
transports
[
ttype
].
crypto_type
=
tech_pvt
->
transports
[
ttype
].
crypto_recv_type
;
}
if
(
tech_pvt
->
transports
[
ttype
].
crypto_type
)
{
switch_rtp_add_crypto_key
(
tech_pvt
->
transports
[
ttype
].
rtp_session
,
SWITCH_RTP_CRYPTO_SEND
,
1
,
tech_pvt
->
transports
[
ttype
].
crypto_type
,
tech_pvt
->
transports
[
ttype
].
local_raw_key
,
SWITCH_RTP_KEY_LEN
);
memcpy
(
ssec
.
local_raw_key
,
tech_pvt
->
transports
[
ttype
].
local_raw_key
,
switch_core_media_crypto_keysalt_len
(
tech_pvt
->
transports
[
ttype
].
crypto_type
));
ssec
.
local_crypto_key
=
switch_core_session_strdup
(
tech_pvt
->
session
,
tech_pvt
->
transports
[
ttype
].
local_crypto_key
);
switch_core_media_add_crypto
(
tech_pvt
->
session
,
&
ssec
,
SWITCH_RTP_CRYPTO_SEND
);
switch_rtp_add_crypto_key
(
tech_pvt
->
transports
[
ttype
].
rtp_session
,
SWITCH_RTP_CRYPTO_SEND_RTCP
,
tech_pvt
->
transports
[
ttype
].
crypto_type
,
&
ssec
);
switch_rtp_add_crypto_key
(
tech_pvt
->
transports
[
ttype
].
rtp_session
,
SWITCH_RTP_CRYPTO_RECV
,
tech_pvt
->
transports
[
ttype
].
crypto_tag
,
tech_pvt
->
transports
[
ttype
].
crypto_type
,
tech_pvt
->
transports
[
ttype
].
remote_raw_key
,
SWITCH_RTP_KEY_LEN
);
memcpy
(
ssec
.
remote_raw_key
,
tech_pvt
->
transports
[
ttype
].
remote_raw_key
,
switch_core_media_crypto_keysalt_len
(
tech_pvt
->
transports
[
ttype
].
crypto_type
));
ssec
.
remote_crypto_key
=
switch_core_session_strdup
(
tech_pvt
->
session
,
tech_pvt
->
transports
[
ttype
].
local_crypto_key
);
switch_core_media_add_crypto
(
tech_pvt
->
session
,
&
ssec
,
SWITCH_RTP_CRYPTO_RECV
);
switch_rtp_add_crypto_key
(
tech_pvt
->
transports
[
ttype
].
rtp_session
,
SWITCH_RTP_CRYPTO_RECV
,
tech_pvt
->
transports
[
ttype
].
crypto_type
,
&
ssec
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
"jingle_secure_audio_confirmed"
,
"true"
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_NOTICE
,
"%s %s crypto confirmed
\n
"
,
ldl_transport_type_str
(
ttype
),
switch_core_session_get_name
(
tech_pvt
->
session
));
}
"%s %s crypto confirmed
\n
"
,
ldl_transport_type_str
(
ttype
),
switch_core_session_get_name
(
tech_pvt
->
session
));
}
}
...
...
src/switch_core_media.c
浏览文件 @
03d8aa4e
...
...
@@ -311,6 +311,12 @@ SWITCH_DECLARE(int) switch_core_media_crypto_keysalt_len(switch_rtp_crypto_key_t
return SUITES[type].keysalt_len;
}
SWITCH_DECLARE(int) switch_core_media_crypto_salt_len(switch_rtp_crypto_key_type_t type)
{
switch_assert(type < CRYPTO_INVALID);
return SUITES[type].salt_len;
}
static const char* CRYPTO_KEY_PARAM_METHOD[CRYPTO_KEY_PARAM_METHOD_INVALID] = {
[CRYPTO_KEY_PARAM_METHOD_INLINE] = "inline",
};
...
...
@@ -1343,7 +1349,7 @@ static const char* switch_core_media_crypto_find_key_material_candidate_end(cons
return end;
}
switch_status_t
switch_core_media_add_crypto(switch_core_session_t *session, switch_secure_settings_t *ssec, switch_rtp_crypto_direction_t direction)
SWITCH_DECLARE(switch_status_t)
switch_core_media_add_crypto(switch_core_session_t *session, switch_secure_settings_t *ssec, switch_rtp_crypto_direction_t direction)
{
unsigned char key[SWITCH_RTP_MAX_CRYPTO_LEN];
switch_rtp_crypto_key_type_t type;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论