Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
f8caa3c8
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f8caa3c8
编写于
2月 03, 2015
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move s->s3->wpend_* to s->rlayer
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
4aa7389e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
22 deletion
+25
-22
ssl/record/d1_pkt.c
ssl/record/d1_pkt.c
+4
-4
ssl/record/rec_layer.h
ssl/record/rec_layer.h
+8
-0
ssl/record/s3_pkt.c
ssl/record/s3_pkt.c
+13
-13
ssl/ssl_locl.h
ssl/ssl_locl.h
+0
-5
未找到文件。
ssl/record/d1_pkt.c
浏览文件 @
f8caa3c8
...
...
@@ -1212,10 +1212,10 @@ int do_dtls1_write(SSL *s, int type, const unsigned char *buf,
* memorize arguments so that ssl3_write_pending can detect bad write
* retries later
*/
s
->
s3
->
wpend_tot
=
len
;
s
->
s3
->
wpend_buf
=
buf
;
s
->
s3
->
wpend_type
=
type
;
s
->
s3
->
wpend_ret
=
len
;
s
->
rlayer
.
wpend_tot
=
len
;
s
->
rlayer
.
wpend_buf
=
buf
;
s
->
rlayer
.
wpend_type
=
type
;
s
->
rlayer
.
wpend_ret
=
len
;
/* we now just need to write the buffer */
return
ssl3_write_pending
(
s
,
type
,
buf
,
len
);
...
...
ssl/record/rec_layer.h
浏览文件 @
f8caa3c8
...
...
@@ -166,6 +166,14 @@ typedef struct record_layer_st {
unsigned
int
alert_fragment_len
;
unsigned
char
handshake_fragment
[
4
];
unsigned
int
handshake_fragment_len
;
/* partial write - check the numbers match */
/* number bytes written */
int
wpend_tot
;
int
wpend_type
;
/* number of bytes submitted */
int
wpend_ret
;
const
unsigned
char
*
wpend_buf
;
}
RECORD_LAYER
;
...
...
ssl/record/s3_pkt.c
浏览文件 @
f8caa3c8
...
...
@@ -467,7 +467,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
* will happen with non blocking IO
*/
if
(
wb
->
left
!=
0
)
{
i
=
ssl3_write_pending
(
s
,
type
,
&
buf
[
tot
],
s
->
s3
->
wpend_tot
);
i
=
ssl3_write_pending
(
s
,
type
,
&
buf
[
tot
],
s
->
rlayer
.
wpend_tot
);
if
(
i
<=
0
)
{
/* XXX should we ssl3_release_write_buffer if i<0? */
s
->
rlayer
.
wnum
=
tot
;
...
...
@@ -579,10 +579,10 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
wb
->
offset
=
0
;
wb
->
left
=
packlen
;
s
->
s3
->
wpend_tot
=
nw
;
s
->
s3
->
wpend_buf
=
&
buf
[
tot
];
s
->
s3
->
wpend_type
=
type
;
s
->
s3
->
wpend_ret
=
nw
;
s
->
rlayer
.
wpend_tot
=
nw
;
s
->
rlayer
.
wpend_buf
=
&
buf
[
tot
];
s
->
rlayer
.
wpend_type
=
type
;
s
->
rlayer
.
wpend_ret
=
nw
;
i
=
ssl3_write_pending
(
s
,
type
,
&
buf
[
tot
],
nw
);
if
(
i
<=
0
)
{
...
...
@@ -863,10 +863,10 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
* memorize arguments so that ssl3_write_pending can detect bad write
* retries later
*/
s
->
s3
->
wpend_tot
=
len
;
s
->
s3
->
wpend_buf
=
buf
;
s
->
s3
->
wpend_type
=
type
;
s
->
s3
->
wpend_ret
=
len
;
s
->
rlayer
.
wpend_tot
=
len
;
s
->
rlayer
.
wpend_buf
=
buf
;
s
->
rlayer
.
wpend_type
=
type
;
s
->
rlayer
.
wpend_ret
=
len
;
/* we now just need to write the buffer */
return
ssl3_write_pending
(
s
,
type
,
buf
,
len
);
...
...
@@ -882,10 +882,10 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
SSL3_BUFFER
*
wb
=
&
s
->
rlayer
.
wbuf
;
/* XXXX */
if
((
s
->
s3
->
wpend_tot
>
(
int
)
len
)
||
((
s
->
s3
->
wpend_buf
!=
buf
)
&&
if
((
s
->
rlayer
.
wpend_tot
>
(
int
)
len
)
||
((
s
->
rlayer
.
wpend_buf
!=
buf
)
&&
!
(
s
->
mode
&
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER
))
||
(
s
->
s3
->
wpend_type
!=
type
))
{
||
(
s
->
rlayer
.
wpend_type
!=
type
))
{
SSLerr
(
SSL_F_SSL3_WRITE_PENDING
,
SSL_R_BAD_WRITE_RETRY
);
return
(
-
1
);
}
...
...
@@ -905,7 +905,7 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
wb
->
left
=
0
;
wb
->
offset
+=
i
;
s
->
rwstate
=
SSL_NOTHING
;
return
(
s
->
s3
->
wpend_ret
);
return
(
s
->
rlayer
.
wpend_ret
);
}
else
if
(
i
<=
0
)
{
if
(
s
->
version
==
DTLS1_VERSION
||
s
->
version
==
DTLS1_BAD_VER
)
{
/*
...
...
ssl/ssl_locl.h
浏览文件 @
f8caa3c8
...
...
@@ -1237,11 +1237,6 @@ typedef struct ssl3_state_st {
int
empty_fragment_done
;
/* The value of 'extra' when the buffers were initialized */
int
init_extra
;
/* partial write - check the numbers match */
int
wpend_tot
;
/* number bytes written */
int
wpend_type
;
int
wpend_ret
;
/* number of bytes submitted */
const
unsigned
char
*
wpend_buf
;
/* used during startup, digest all incoming/outgoing packets */
BIO
*
handshake_buffer
;
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录