Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
af9752e5
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看板
提交
af9752e5
编写于
2月 02, 2015
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Create RECORD_LAYER_clear function.
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
a0682a5e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
21 deletion
+29
-21
ssl/record/rec_layer.h
ssl/record/rec_layer.h
+1
-0
ssl/record/s3_pkt.c
ssl/record/s3_pkt.c
+27
-0
ssl/ssl_lib.c
ssl/ssl_lib.c
+1
-21
未找到文件。
ssl/record/rec_layer.h
浏览文件 @
af9752e5
...
...
@@ -166,6 +166,7 @@ typedef struct record_layer_st {
#define RECORD_LAYER_get_rrec(rl) (&(rl)->rrec)
#define RECORD_LAYER_get_wrec(rl) (&(rl)->wrec)
void
RECORD_LAYER_clear
(
RECORD_LAYER
*
rl
);
__owur
int
ssl23_read_bytes
(
SSL
*
s
,
int
n
);
__owur
int
ssl23_write_bytes
(
SSL
*
s
);
__owur
int
ssl3_write_bytes
(
SSL
*
s
,
int
type
,
const
void
*
buf
,
int
len
);
...
...
ssl/record/s3_pkt.c
浏览文件 @
af9752e5
...
...
@@ -132,6 +132,33 @@
# define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0
#endif
void
RECORD_LAYER_clear
(
RECORD_LAYER
*
rl
)
{
unsigned
char
*
rp
,
*
wp
;
size_t
rlen
,
wlen
;
int
read_ahead
;
SSL
*
s
;
s
=
rl
->
s
;
read_ahead
=
rl
->
read_ahead
;
rp
=
SSL3_BUFFER_get_buf
(
&
rl
->
rbuf
);
rlen
=
SSL3_BUFFER_get_len
(
&
rl
->
rbuf
);
wp
=
SSL3_BUFFER_get_buf
(
&
rl
->
wbuf
);
wlen
=
SSL3_BUFFER_get_len
(
&
rl
->
wbuf
);
memset
(
rl
,
0
,
sizeof
(
RECORD_LAYER
));
SSL3_BUFFER_set_buf
(
&
rl
->
rbuf
,
rp
);
SSL3_BUFFER_set_len
(
&
rl
->
rbuf
,
rlen
);
SSL3_BUFFER_set_buf
(
&
rl
->
wbuf
,
wp
);
SSL3_BUFFER_set_len
(
&
rl
->
wbuf
,
wlen
);
/* Do I need to do this? As far as I can tell read_ahead did not
* previously get reset by SSL_clear...so I'll keep it that way..but is
* that right?
*/
rl
->
read_ahead
=
read_ahead
;
rl
->
s
=
s
;
}
int
ssl3_read_n
(
SSL
*
s
,
int
n
,
int
max
,
int
extend
)
{
/*
...
...
ssl/ssl_lib.c
浏览文件 @
af9752e5
...
...
@@ -189,10 +189,6 @@ SSL3_ENC_METHOD ssl3_undef_enc_method = {
int
SSL_clear
(
SSL
*
s
)
{
unsigned
char
*
rp
,
*
wp
;
size_t
rlen
,
wlen
;
int
read_ahead
;
if
(
s
->
method
==
NULL
)
{
SSLerr
(
SSL_F_SSL_CLEAR
,
SSL_R_NO_METHOD_SPECIFIED
);
return
(
0
);
...
...
@@ -245,23 +241,7 @@ int SSL_clear(SSL *s)
}
else
s
->
method
->
ssl_clear
(
s
);
read_ahead
=
RECORD_LAYER_get_read_ahead
(
&
s
->
rlayer
);
rp
=
SSL3_BUFFER_get_buf
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
));
rlen
=
SSL3_BUFFER_get_len
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
));
wp
=
SSL3_BUFFER_get_buf
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
));
wlen
=
SSL3_BUFFER_get_len
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
));
memset
(
&
s
->
rlayer
,
0
,
sizeof
s
->
rlayer
);
SSL3_BUFFER_set_buf
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
),
rp
);
SSL3_BUFFER_set_len
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
),
rlen
);
SSL3_BUFFER_set_buf
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
),
wp
);
SSL3_BUFFER_set_len
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
),
wlen
);
/* Do I need to do this? As far as I can tell read_ahead did not
* previously get reset by SSL_clear...so I'll keep it that way..but is
* that right?
*/
RECORD_LAYER_set_read_ahead
(
&
s
->
rlayer
,
read_ahead
);
RECORD_LAYER_set_ssl
(
&
s
->
rlayer
,
s
);
RECORD_LAYER_clear
(
&
s
->
rlayer
);
return
(
1
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录