Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d627f7c2
提交
d627f7c2
authored
4月 01, 2013
作者:
Jeff Lenk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
windows compiler warnings
上级
511b2fc4
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
29 行增加
和
14 行删除
+29
-14
aes_icm.c
libs/srtp/crypto/cipher/aes_icm.c
+5
-2
cipher.c
libs/srtp/crypto/cipher/cipher.c
+3
-3
null_cipher.c
libs/srtp/crypto/cipher/null_cipher.c
+4
-0
crypto_kernel.c
libs/srtp/crypto/kernel/crypto_kernel.c
+2
-2
err.c
libs/srtp/crypto/kernel/err.c
+3
-0
datatypes.c
libs/srtp/crypto/math/datatypes.c
+4
-2
stat.c
libs/srtp/crypto/math/stat.c
+1
-1
rdbx.c
libs/srtp/crypto/replay/rdbx.c
+1
-1
ut_sim.c
libs/srtp/crypto/replay/ut_sim.c
+3
-0
srtp.c
libs/srtp/srtp/srtp.c
+3
-3
没有找到文件。
libs/srtp/crypto/cipher/aes_icm.c
浏览文件 @
d627f7c2
...
...
@@ -49,6 +49,9 @@
#include "aes_icm.h"
#include "alloc.h"
#ifdef _MSC_VER
#pragma warning(disable:4100)
#endif
debug_module_t
mod_aes_icm
=
{
0
,
/* debugging is off by default */
...
...
@@ -378,7 +381,7 @@ aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c,
for
(
i
=
0
;
i
<
(
bytes_to_encr
/
sizeof
(
v128_t
));
i
++
)
{
/* fill buffer with new keystream */
aes_icm_advance_ismacryp
(
c
,
forIsmacryp
);
aes_icm_advance_ismacryp
(
c
,
(
uint8_t
)
forIsmacryp
);
/*
* add keystream into the data buffer (this would be a lot faster
...
...
@@ -426,7 +429,7 @@ aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c,
if
((
bytes_to_encr
&
0xf
)
!=
0
)
{
/* fill buffer with new keystream */
aes_icm_advance_ismacryp
(
c
,
forIsmacryp
);
aes_icm_advance_ismacryp
(
c
,
(
uint8_t
)
forIsmacryp
);
for
(
i
=
0
;
i
<
(
bytes_to_encr
&
0xf
);
i
++
)
*
buf
++
^=
c
->
keystream_buffer
.
v8
[
i
];
...
...
libs/srtp/crypto/cipher/cipher.c
浏览文件 @
d627f7c2
...
...
@@ -155,7 +155,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
test_case
->
ciphertext_length_octets
));
/* compare the resulting ciphertext with that in the test case */
if
(
len
!=
test_case
->
ciphertext_length_octets
)
if
(
len
!=
(
unsigned
int
)
test_case
->
ciphertext_length_octets
)
return
err_status_algo_fail
;
status
=
err_status_ok
;
for
(
i
=
0
;
i
<
test_case
->
ciphertext_length_octets
;
i
++
)
...
...
@@ -222,7 +222,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
test_case
->
plaintext_length_octets
));
/* compare the resulting plaintext with that in the test case */
if
(
len
!=
test_case
->
plaintext_length_octets
)
if
(
len
!=
(
unsigned
int
)
test_case
->
plaintext_length_octets
)
return
err_status_algo_fail
;
status
=
err_status_ok
;
for
(
i
=
0
;
i
<
test_case
->
plaintext_length_octets
;
i
++
)
...
...
@@ -344,7 +344,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
octet_string_hex_string
(
buffer
,
length
));
/* compare the resulting plaintext with the original one */
if
(
length
!=
plaintext_len
)
if
(
length
!=
(
unsigned
int
)
plaintext_len
)
return
err_status_algo_fail
;
status
=
err_status_ok
;
for
(
i
=
0
;
i
<
plaintext_len
;
i
++
)
...
...
libs/srtp/crypto/cipher/null_cipher.c
浏览文件 @
d627f7c2
...
...
@@ -48,6 +48,10 @@
#include "null_cipher.h"
#include "alloc.h"
#ifdef _MSC_VER
#pragma warning(disable:4100)
#endif
/* the null_cipher uses the cipher debug module */
extern
debug_module_t
mod_cipher
;
...
...
libs/srtp/crypto/kernel/crypto_kernel.c
浏览文件 @
d627f7c2
...
...
@@ -300,7 +300,7 @@ crypto_kernel_shutdown() {
static
inline
err_status_t
crypto_kernel_do_load_cipher_type
(
cipher_type_t
*
new_ct
,
cipher_type_id_t
id
,
int
replace
)
{
kernel_cipher_type_t
*
ctype
,
*
new_ctype
;
kernel_cipher_type_t
*
ctype
,
*
new_ctype
=
0
;
err_status_t
status
;
/* defensive coding */
...
...
@@ -370,7 +370,7 @@ crypto_kernel_replace_cipher_type(cipher_type_t *new_ct, cipher_type_id_t id) {
err_status_t
crypto_kernel_do_load_auth_type
(
auth_type_t
*
new_at
,
auth_type_id_t
id
,
int
replace
)
{
kernel_auth_type_t
*
atype
,
*
new_atype
;
kernel_auth_type_t
*
atype
,
*
new_atype
=
0
;
err_status_t
status
;
/* defensive coding */
...
...
libs/srtp/crypto/kernel/err.c
浏览文件 @
d627f7c2
...
...
@@ -50,6 +50,9 @@
# endif
#endif
#ifdef _MSC_VER
#pragma warning(disable:4100)
#endif
/* err_level reflects the level of errors that are reported */
...
...
libs/srtp/crypto/math/datatypes.c
浏览文件 @
d627f7c2
...
...
@@ -152,7 +152,9 @@ hex_char_to_nibble(uint8_t c) {
default:
return
-
1
;
/* this flags an error */
}
/* NOTREACHED */
#ifndef WIN32
return
-
1
;
/* this keeps compilers from complaining */
#endif
}
int
...
...
@@ -179,7 +181,7 @@ hex_string_to_octet_string(char *raw, char *hex, int len) {
tmp
=
hex_char_to_nibble
(
hex
[
0
]);
if
(
tmp
==
-
1
)
return
hex_len
;
x
=
(
tmp
<<
4
);
x
=
(
uint8_t
)(
tmp
<<
4
);
hex_len
++
;
tmp
=
hex_char_to_nibble
(
hex
[
1
]);
if
(
tmp
==
-
1
)
...
...
@@ -704,7 +706,7 @@ base64_string_to_octet_string(char *raw, char *base64, int len) {
tmp
=
base64_char_to_sextet
(
base64
[
0
]);
if
(
tmp
==
-
1
)
return
base64_len
;
x
=
(
tmp
<<
6
);
x
=
(
uint8_t
)(
tmp
<<
6
);
base64_len
++
;
tmp
=
base64_char_to_sextet
(
base64
[
1
]);
if
(
tmp
==
-
1
)
...
...
libs/srtp/crypto/math/stat.c
浏览文件 @
d627f7c2
...
...
@@ -24,7 +24,7 @@ debug_module_t mod_stat = {
err_status_t
stat_test_monobit
(
uint8_t
*
data
)
{
uint8_t
*
data_end
=
data
+
STAT_TEST_DATA_LEN
;
uint16_
t
ones_count
;
in
t
ones_count
;
ones_count
=
0
;
while
(
data
<
data_end
)
{
...
...
libs/srtp/crypto/replay/rdbx.c
浏览文件 @
d627f7c2
...
...
@@ -292,7 +292,7 @@ rdbx_add_index(rdbx_t *rdbx, int delta) {
if
(
delta
>
0
)
{
/* shift forward by delta */
index_advance
(
&
rdbx
->
index
,
delta
);
index_advance
(
&
rdbx
->
index
,
(
sequence_number_t
)
delta
);
bitvector_left_shift
(
&
rdbx
->
bitmask
,
delta
);
bitvector_set_bit
(
&
rdbx
->
bitmask
,
bitvector_get_length
(
&
rdbx
->
bitmask
)
-
1
);
}
else
{
...
...
libs/srtp/crypto/replay/ut_sim.c
浏览文件 @
d627f7c2
...
...
@@ -47,6 +47,9 @@
#include "ut_sim.h"
#ifdef _MSC_VER
#pragma warning(disable:4100)
#endif
int
ut_compar
(
const
void
*
a
,
const
void
*
b
)
{
...
...
libs/srtp/srtp/srtp.c
浏览文件 @
d627f7c2
...
...
@@ -838,7 +838,7 @@ srtp_stream_init(srtp_stream_ctx_t *srtp,
* estimate the packet index using the start of the replay window
* and the sequence number from the header
*/
delta
=
rdbx_estimate_index
(
&
stream
->
rtp_rdbx
,
&
est
,
ntohs
(
hdr
->
seq
));
delta
=
rdbx_estimate_index
(
&
stream
->
rtp_rdbx
,
&
est
,
ntohs
(
(
uint16_t
)
hdr
->
seq
));
status
=
rdbx_check
(
&
stream
->
rtp_rdbx
,
delta
);
if
(
status
)
{
if
(
status
!=
err_status_replay_fail
||
!
stream
->
allow_repeat_tx
)
...
...
@@ -999,7 +999,7 @@ srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
est
=
(
xtd_seq_num_t
)
make64
(
0
,
ntohs
(
hdr
->
seq
));
delta
=
low32
(
est
);
#else
est
=
(
xtd_seq_num_t
)
ntohs
(
hdr
->
seq
);
est
=
(
xtd_seq_num_t
)
ntohs
(
(
uint16_t
)
hdr
->
seq
);
delta
=
(
int
)
est
;
#endif
}
else
{
...
...
@@ -1013,7 +1013,7 @@ srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
}
else
{
/* estimate packet index from seq. num. in header */
delta
=
rdbx_estimate_index
(
&
stream
->
rtp_rdbx
,
&
est
,
ntohs
(
hdr
->
seq
));
delta
=
rdbx_estimate_index
(
&
stream
->
rtp_rdbx
,
&
est
,
ntohs
(
(
uint16_t
)
hdr
->
seq
));
/* check replay database */
status
=
rdbx_check
(
&
stream
->
rtp_rdbx
,
delta
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论