Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
6db6bc5a
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6db6bc5a
编写于
10月 04, 2016
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert some libssl local functions to size_t
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
cb150cbc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
18 deletion
+18
-18
ssl/s3_enc.c
ssl/s3_enc.c
+2
-1
ssl/s3_lib.c
ssl/s3_lib.c
+1
-1
ssl/ssl_lib.c
ssl/ssl_lib.c
+1
-1
ssl/ssl_locl.h
ssl/ssl_locl.h
+4
-4
ssl/t1_enc.c
ssl/t1_enc.c
+10
-11
未找到文件。
ssl/s3_enc.c
浏览文件 @
6db6bc5a
...
...
@@ -407,7 +407,8 @@ int ssl3_digest_cached_records(SSL *s, int keep)
return
1
;
}
size_t
ssl3_final_finish_mac
(
SSL
*
s
,
const
char
*
sender
,
int
len
,
unsigned
char
*
p
)
size_t
ssl3_final_finish_mac
(
SSL
*
s
,
const
char
*
sender
,
size_t
len
,
unsigned
char
*
p
)
{
int
ret
;
EVP_MD_CTX
*
ctx
=
NULL
;
...
...
ssl/s3_lib.c
浏览文件 @
6db6bc5a
...
...
@@ -3941,7 +3941,7 @@ long ssl_get_algorithm2(SSL *s)
* Fill a ClientRandom or ServerRandom field of length len. Returns <= 0 on
* failure, 1 on success.
*/
int
ssl_fill_hello_random
(
SSL
*
s
,
int
server
,
unsigned
char
*
result
,
in
t
len
)
int
ssl_fill_hello_random
(
SSL
*
s
,
int
server
,
unsigned
char
*
result
,
size_
t
len
)
{
int
send_time
=
0
;
...
...
ssl/ssl_lib.c
浏览文件 @
6db6bc5a
...
...
@@ -65,7 +65,7 @@ SSL3_ENC_METHOD ssl3_undef_enc_method = {
(
int
(
*
)(
SSL
*
,
unsigned
char
*
,
unsigned
char
*
,
size_t
,
size_t
*
))
ssl_undefined_function
,
(
int
(
*
)(
SSL
*
,
int
))
ssl_undefined_function
,
(
size_t
(
*
)(
SSL
*
,
const
char
*
,
in
t
,
unsigned
char
*
))
(
size_t
(
*
)(
SSL
*
,
const
char
*
,
size_
t
,
unsigned
char
*
))
ssl_undefined_function
,
0
,
/* finish_mac_length */
NULL
,
/* client_finished_label */
...
...
ssl/ssl_locl.h
浏览文件 @
6db6bc5a
...
...
@@ -1572,7 +1572,7 @@ typedef struct ssl3_enc_method {
int
(
*
generate_master_secret
)
(
SSL
*
,
unsigned
char
*
,
unsigned
char
*
,
size_t
,
size_t
*
);
int
(
*
change_cipher_state
)
(
SSL
*
,
int
);
size_t
(
*
final_finish_mac
)
(
SSL
*
,
const
char
*
,
in
t
,
unsigned
char
*
);
size_t
(
*
final_finish_mac
)
(
SSL
*
,
const
char
*
,
size_
t
,
unsigned
char
*
);
int
finish_mac_length
;
const
char
*
client_finished_label
;
int
client_finished_label_len
;
...
...
@@ -1862,7 +1862,7 @@ __owur int ssl_verify_alarm_type(long type);
void
ssl_sort_cipher_list
(
void
);
void
ssl_load_ciphers
(
void
);
__owur
int
ssl_fill_hello_random
(
SSL
*
s
,
int
server
,
unsigned
char
*
field
,
in
t
len
);
size_
t
len
);
__owur
int
ssl_generate_master_secret
(
SSL
*
s
,
unsigned
char
*
pms
,
size_t
pmslen
,
int
free_pms
);
__owur
EVP_PKEY
*
ssl_generate_pkey
(
EVP_PKEY
*
pm
);
...
...
@@ -1887,7 +1887,7 @@ __owur const SSL_CIPHER *ssl3_get_cipher(unsigned int u);
int
ssl3_renegotiate
(
SSL
*
ssl
);
int
ssl3_renegotiate_check
(
SSL
*
ssl
);
__owur
int
ssl3_dispatch_alert
(
SSL
*
s
);
__owur
size_t
ssl3_final_finish_mac
(
SSL
*
s
,
const
char
*
sender
,
in
t
slen
,
__owur
size_t
ssl3_final_finish_mac
(
SSL
*
s
,
const
char
*
sender
,
size_
t
slen
,
unsigned
char
*
p
);
__owur
int
ssl3_finish_mac
(
SSL
*
s
,
const
unsigned
char
*
buf
,
size_t
len
);
void
ssl3_free_digest_list
(
SSL
*
s
);
...
...
@@ -1983,7 +1983,7 @@ void ssl_free_wbio_buffer(SSL *s);
__owur
int
tls1_change_cipher_state
(
SSL
*
s
,
int
which
);
__owur
int
tls1_setup_key_block
(
SSL
*
s
);
__owur
size_t
tls1_final_finish_mac
(
SSL
*
s
,
const
char
*
str
,
in
t
slen
,
__owur
size_t
tls1_final_finish_mac
(
SSL
*
s
,
const
char
*
str
,
size_
t
slen
,
unsigned
char
*
p
);
__owur
int
tls1_generate_master_secret
(
SSL
*
s
,
unsigned
char
*
out
,
unsigned
char
*
p
,
size_t
len
,
...
...
ssl/t1_enc.c
浏览文件 @
6db6bc5a
...
...
@@ -43,19 +43,18 @@
/* seed1 through seed5 are concatenated */
static
int
tls1_PRF
(
SSL
*
s
,
const
void
*
seed1
,
in
t
seed1_len
,
const
void
*
seed2
,
in
t
seed2_len
,
const
void
*
seed3
,
in
t
seed3_len
,
const
void
*
seed4
,
in
t
seed4_len
,
const
void
*
seed5
,
in
t
seed5_len
,
const
unsigned
char
*
sec
,
in
t
slen
,
unsigned
char
*
out
,
in
t
olen
)
const
void
*
seed1
,
size_
t
seed1_len
,
const
void
*
seed2
,
size_
t
seed2_len
,
const
void
*
seed3
,
size_
t
seed3_len
,
const
void
*
seed4
,
size_
t
seed4_len
,
const
void
*
seed5
,
size_
t
seed5_len
,
const
unsigned
char
*
sec
,
size_
t
slen
,
unsigned
char
*
out
,
size_
t
olen
)
{
const
EVP_MD
*
md
=
ssl_prf_md
(
s
);
EVP_PKEY_CTX
*
pctx
=
NULL
;
int
ret
=
0
;
size_t
outlen
=
olen
;
if
(
md
==
NULL
)
{
/* Should never happen */
...
...
@@ -79,7 +78,7 @@ static int tls1_PRF(SSL *s,
if
(
EVP_PKEY_CTX_add1_tls1_prf_seed
(
pctx
,
seed5
,
seed5_len
)
<=
0
)
goto
err
;
if
(
EVP_PKEY_derive
(
pctx
,
out
,
&
o
ut
len
)
<=
0
)
if
(
EVP_PKEY_derive
(
pctx
,
out
,
&
olen
)
<=
0
)
goto
err
;
ret
=
1
;
...
...
@@ -88,7 +87,6 @@ static int tls1_PRF(SSL *s,
return
ret
;
}
/* TODO(size_t): convert me */
static
int
tls1_generate_key_block
(
SSL
*
s
,
unsigned
char
*
km
,
size_t
num
)
{
int
ret
;
...
...
@@ -451,7 +449,8 @@ int tls1_setup_key_block(SSL *s)
return
(
ret
);
}
size_t
tls1_final_finish_mac
(
SSL
*
s
,
const
char
*
str
,
int
slen
,
unsigned
char
*
out
)
size_t
tls1_final_finish_mac
(
SSL
*
s
,
const
char
*
str
,
size_t
slen
,
unsigned
char
*
out
)
{
size_t
hashlen
;
unsigned
char
hash
[
EVP_MAX_MD_SIZE
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录