Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ee5dac01
提交
ee5dac01
authored
7月 06, 2011
作者:
Viktor Krikun
提交者:
Travis Cross
3月 31, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Miscellaneous updates
上级
b218edc7
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
33 行增加
和
13 行删除
+33
-13
zrtp_version.h
include/zrtp_version.h
+3
-3
configure.in
projects/gnu/configure.in
+2
-2
zrtp_protocol.c
src/zrtp_protocol.c
+23
-5
zrtp_utils_proto.c
src/zrtp_utils_proto.c
+5
-3
没有找到文件。
include/zrtp_version.h
浏览文件 @
ee5dac01
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
#define LIBZRTP_VERSION_MAJOR 1
#define LIBZRTP_VERSION_MAJOR 1
#define LIBZRTP_VERSION_MINOR 1
0
#define LIBZRTP_VERSION_MINOR 1
2
#define LIBZRTP_VERSION_BUILD 59
4
#define LIBZRTP_VERSION_BUILD 59
8
#define LIBZRTP_VERSION_STR "v1.1
0 594
"
#define LIBZRTP_VERSION_STR "v1.1
2 598
"
#endif
/*__ZRTP_VERSION_H__*/
#endif
/*__ZRTP_VERSION_H__*/
projects/gnu/configure.in
浏览文件 @
ee5dac01
#
#
# Copyright (c) 2006-20
09
Philip R. Zimmermann. All rights reserved.
# Copyright (c) 2006-20
11
Philip R. Zimmermann. All rights reserved.
# Contact: http://philzimmermann.com
# Contact: http://philzimmermann.com
# For licensing and other legal details, see the file zrtp_legal.c.
# For licensing and other legal details, see the file zrtp_legal.c.
#
#
...
@@ -32,7 +32,7 @@ case $target_os in
...
@@ -32,7 +32,7 @@ case $target_os in
esac
esac
AM_INIT_AUTOMAKE([libzrtp], [
0.91
])
AM_INIT_AUTOMAKE([libzrtp], [
1.12
])
AX_PREFIX_CONFIG_H(../../include/zrtp_config_unix.h,ZRTP,config/config.h)
AX_PREFIX_CONFIG_H(../../include/zrtp_config_unix.h,ZRTP,config/config.h)
CFLAGS="$CFLAGS -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1"
CFLAGS="$CFLAGS -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1"
...
...
src/zrtp_protocol.c
浏览文件 @
ee5dac01
...
@@ -314,12 +314,30 @@ static zrtp_status_t _derive_s0(zrtp_stream_t* stream, int is_initiator)
...
@@ -314,12 +314,30 @@ static zrtp_status_t _derive_s0(zrtp_stream_t* stream, int is_initiator)
comp_length
=
zrtp_hton32
(
1L
);
comp_length
=
zrtp_hton32
(
1L
);
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
&
comp_length
,
4
);
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
&
comp_length
,
4
);
switch
(
stream
->
pubkeyscheme
->
base
.
id
)
{
case
ZRTP_PKTYPE_DH2048
:
case
ZRTP_PKTYPE_DH3072
:
case
ZRTP_PKTYPE_DH4096
:
comp_length
=
stream
->
pubkeyscheme
->
pv_length
;
ZRTP_LOG
(
3
,(
_ZTU_
,
"DH comp_length=%u
\n
"
,
comp_length
));
break
;
case
ZRTP_PKTYPE_EC256P
:
case
ZRTP_PKTYPE_EC384P
:
case
ZRTP_PKTYPE_EC521P
:
comp_length
=
stream
->
pubkeyscheme
->
pv_length
/
2
;
ZRTP_LOG
(
3
,(
_ZTU_
,
"ECDH comp_length=%u
\n
"
,
comp_length
));
break
;
default:
break
;
}
bnBegin
(
&
dhresult
);
bnBegin
(
&
dhresult
);
stream
->
pubkeyscheme
->
compute
(
stream
->
pubkeyscheme
,
stream
->
pubkeyscheme
->
compute
(
stream
->
pubkeyscheme
,
&
stream
->
dh_cc
,
&
stream
->
dh_cc
,
&
dhresult
,
&
dhresult
,
&
stream
->
dh_cc
.
peer_pv
);
&
stream
->
dh_cc
.
peer_pv
);
comp_length
=
stream
->
pubkeyscheme
->
pv_length
;
bnExtractBigBytes
(
&
dhresult
,
(
uint8_t
*
)
buffer
,
0
,
comp_length
);
bnExtractBigBytes
(
&
dhresult
,
(
uint8_t
*
)
buffer
,
0
,
comp_length
);
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
buffer
,
comp_length
);
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
buffer
,
comp_length
);
bnEnd
(
&
dhresult
);
bnEnd
(
&
dhresult
);
...
...
src/zrtp_utils_proto.c
浏览文件 @
ee5dac01
...
@@ -430,7 +430,7 @@ zrtp_status_t _zrtp_compute_preshared_key( zrtp_session_t *session,
...
@@ -430,7 +430,7 @@ zrtp_status_t _zrtp_compute_preshared_key( zrtp_session_t *session,
{
{
static
const
zrtp_string8_t
presh_key_str
=
ZSTR_INIT_WITH_CONST_CSTRING
(
ZRTP_COMMIT_HV_KEY_STR
);
static
const
zrtp_string8_t
presh_key_str
=
ZSTR_INIT_WITH_CONST_CSTRING
(
ZRTP_COMMIT_HV_KEY_STR
);
zrtp_string32_t
preshared_key
=
ZSTR_INIT_EMPTY
(
preshared_key
);
zrtp_string32_t
preshared_key
=
ZSTR_INIT_EMPTY
(
preshared_key
);
static
const
uint32_t
length_rs
=
ZRTP_RS_SIZE
;
static
uint32_t
length_rs
=
ZRTP_RS_SIZE
;
static
const
uint32_t
length_zero
=
0
;
static
const
uint32_t
length_zero
=
0
;
void
*
hash_ctx
=
session
->
hash
->
hash_begin
(
session
->
hash
);
void
*
hash_ctx
=
session
->
hash
->
hash_begin
(
session
->
hash
);
...
@@ -438,6 +438,8 @@ zrtp_status_t _zrtp_compute_preshared_key( zrtp_session_t *session,
...
@@ -438,6 +438,8 @@ zrtp_status_t _zrtp_compute_preshared_key( zrtp_session_t *session,
return
zrtp_status_alloc_fail
;
return
zrtp_status_alloc_fail
;
}
}
length_rs
=
zrtp_hton32
(
length_rs
);
if
(
rs1
)
{
if
(
rs1
)
{
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
&
length_rs
,
4
);
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
&
length_rs
,
4
);
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
rs1
->
buffer
,
ZRTP_RS_SIZE
);
session
->
hash
->
hash_update
(
session
->
hash
,
hash_ctx
,
(
const
int8_t
*
)
rs1
->
buffer
,
ZRTP_RS_SIZE
);
...
@@ -466,8 +468,8 @@ zrtp_status_t _zrtp_compute_preshared_key( zrtp_session_t *session,
...
@@ -466,8 +468,8 @@ zrtp_status_t _zrtp_compute_preshared_key( zrtp_session_t *session,
if
(
key_id
)
{
if
(
key_id
)
{
session
->
hash
->
hmac_truncated
(
session
->
hash
,
session
->
hash
->
hmac_truncated
(
session
->
hash
,
ZSTR_GV
(
presh_key_str
),
ZSTR_GV
(
preshared_key
),
ZSTR_GV
(
preshared_key
),
ZSTR_GV
(
presh_key_str
),
ZRTP_HV_KEY_SIZE
,
ZRTP_HV_KEY_SIZE
,
ZSTR_GVP
(
key_id
));
ZSTR_GVP
(
key_id
));
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论