Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
0fbe46ea
提交
0fbe46ea
authored
10月 12, 2018
作者:
Hunyadvári Péter
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11207: [core] Fix msrp_init_ssl and msrp_deinit_ssl functions, check globals.ssl_ready variable
上级
785ac737
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
10 行删除
+8
-10
switch_msrp.c
src/switch_msrp.c
+8
-10
没有找到文件。
src/switch_msrp.c
浏览文件 @
0fbe46ea
...
...
@@ -103,13 +103,14 @@ static switch_bool_t msrp_check_success_report(switch_msrp_msg_t *msrp_msg)
static
void
msrp_deinit_ssl
()
{
globals
.
ssl_ready
=
0
;
if
(
globals
.
ssl_ctx
)
{
SSL_CTX_free
(
globals
.
ssl_ctx
);
globals
.
ssl_ctx
=
NULL
;
}
}
static
int
msrp_init_ssl
()
static
void
msrp_init_ssl
()
{
const
char
*
err
=
""
;
...
...
@@ -175,15 +176,11 @@ static int msrp_init_ssl()
SSL_CTX_set_cipher_list
(
globals
.
ssl_ctx
,
"HIGH:!DSS:!aNULL@STRENGTH"
);
return
1
;
return
;
fail
:
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"SSL ERR: %s
\n
"
,
err
);
globals
.
ssl_ready
=
0
;
msrp_deinit_ssl
();
return
0
;
}
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ip
,
globals
.
ip
);
...
...
@@ -316,10 +313,7 @@ SWITCH_DECLARE(switch_status_t) switch_msrp_init()
globals
.
msock
.
thread
=
thread
;
}
if
(
msrp_init_ssl
()
==
0
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"MSRP ssl init failed
\n
"
);
return
SWITCH_STATUS_FALSE
;
}
msrp_init_ssl
();
status
=
msock_init
(
globals
.
ip
,
globals
.
msock_ssl
.
port
,
&
globals
.
msock_ssl
.
sock
,
pool
);
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
...
...
@@ -1145,6 +1139,10 @@ static void *SWITCH_THREAD_FUNC msrp_worker(switch_thread_t *thread, void *obj)
// switch_socket_opt_set(csock->sock, SWITCH_SO_NONBLOCK, TRUE);
if
(
csock
->
secure
)
{
// tls?
if
(
globals
.
ssl_ready
!=
1
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"SSL not ready
\n
"
);
goto
end
;
}
int
secure_established
=
0
;
int
sanity
=
10
;
switch_os_socket_t
sockdes
=
SWITCH_SOCK_INVALID
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论