Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
ab97b2cd
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,发现更多精彩内容 >>
提交
ab97b2cd
编写于
1月 30, 2015
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move s->s3->wbuf to s->rlayer->wbuf
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
db9a32e7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
12 deletion
+11
-12
ssl/record/rec_layer.h
ssl/record/rec_layer.h
+3
-1
ssl/s3_lib.c
ssl/s3_lib.c
+0
-8
ssl/ssl_lib.c
ssl/ssl_lib.c
+8
-2
ssl/ssl_locl.h
ssl/ssl_locl.h
+0
-1
未找到文件。
ssl/record/rec_layer.h
浏览文件 @
ab97b2cd
...
@@ -121,10 +121,12 @@ typedef struct record_layer_st {
...
@@ -121,10 +121,12 @@ typedef struct record_layer_st {
int
read_ahead
;
int
read_ahead
;
/* read IO goes into here */
/* read IO goes into here */
SSL3_BUFFER
rbuf
;
SSL3_BUFFER
rbuf
;
/* write IO goes into here */
SSL3_BUFFER
wbuf
;
}
RECORD_LAYER
;
}
RECORD_LAYER
;
#define RECORD_LAYER_set_ssl(rl, s) ((rl)->s = (s))
#define RECORD_LAYER_set_ssl(rl, s) ((rl)->s = (s))
#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
#define RECORD_LAYER_get_rbuf(rl) (&(rl)->rbuf)
#define RECORD_LAYER_get_rbuf(rl) (&(rl)->rbuf)
#define RECORD_LAYER_get_wbuf(rl) (&(rl)->
s->s3->
wbuf)
#define RECORD_LAYER_get_wbuf(rl) (&(rl)->wbuf)
ssl/s3_lib.c
浏览文件 @
ab97b2cd
...
@@ -3131,8 +3131,6 @@ void ssl3_free(SSL *s)
...
@@ -3131,8 +3131,6 @@ void ssl3_free(SSL *s)
return
;
return
;
ssl3_cleanup_key_block
(
s
);
ssl3_cleanup_key_block
(
s
);
if
(
SSL3_BUFFER_is_initialised
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
)))
ssl3_release_write_buffer
(
s
);
if
(
s
->
s3
->
rrec
.
comp
!=
NULL
)
if
(
s
->
s3
->
rrec
.
comp
!=
NULL
)
OPENSSL_free
(
s
->
s3
->
rrec
.
comp
);
OPENSSL_free
(
s
->
s3
->
rrec
.
comp
);
#ifndef OPENSSL_NO_DH
#ifndef OPENSSL_NO_DH
...
@@ -3162,8 +3160,6 @@ void ssl3_free(SSL *s)
...
@@ -3162,8 +3160,6 @@ void ssl3_free(SSL *s)
void
ssl3_clear
(
SSL
*
s
)
void
ssl3_clear
(
SSL
*
s
)
{
{
unsigned
char
*
wp
;
size_t
wlen
;
int
init_extra
;
int
init_extra
;
ssl3_cleanup_key_block
(
s
);
ssl3_cleanup_key_block
(
s
);
...
@@ -3188,8 +3184,6 @@ void ssl3_clear(SSL *s)
...
@@ -3188,8 +3184,6 @@ void ssl3_clear(SSL *s)
# endif
/* !OPENSSL_NO_EC */
# endif
/* !OPENSSL_NO_EC */
#endif
/* !OPENSSL_NO_TLSEXT */
#endif
/* !OPENSSL_NO_TLSEXT */
wp
=
SSL3_BUFFER_get_buf
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
));
wlen
=
SSL3_BUFFER_get_len
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
));
init_extra
=
s
->
s3
->
init_extra
;
init_extra
=
s
->
s3
->
init_extra
;
BIO_free
(
s
->
s3
->
handshake_buffer
);
BIO_free
(
s
->
s3
->
handshake_buffer
);
s
->
s3
->
handshake_buffer
=
NULL
;
s
->
s3
->
handshake_buffer
=
NULL
;
...
@@ -3203,8 +3197,6 @@ void ssl3_clear(SSL *s)
...
@@ -3203,8 +3197,6 @@ void ssl3_clear(SSL *s)
}
}
#endif
#endif
memset
(
s
->
s3
,
0
,
sizeof
*
s
->
s3
);
memset
(
s
->
s3
,
0
,
sizeof
*
s
->
s3
);
SSL3_BUFFER_set_buf
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
),
wp
);
SSL3_BUFFER_set_len
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
),
wlen
);
s
->
s3
->
init_extra
=
init_extra
;
s
->
s3
->
init_extra
=
init_extra
;
ssl_free_wbio_buffer
(
s
);
ssl_free_wbio_buffer
(
s
);
...
...
ssl/ssl_lib.c
浏览文件 @
ab97b2cd
...
@@ -189,8 +189,8 @@ SSL3_ENC_METHOD ssl3_undef_enc_method = {
...
@@ -189,8 +189,8 @@ SSL3_ENC_METHOD ssl3_undef_enc_method = {
int
SSL_clear
(
SSL
*
s
)
int
SSL_clear
(
SSL
*
s
)
{
{
unsigned
char
*
rp
;
unsigned
char
*
rp
,
*
wp
;
size_t
rlen
;
size_t
rlen
,
wlen
;
int
read_ahead
;
int
read_ahead
;
if
(
s
->
method
==
NULL
)
{
if
(
s
->
method
==
NULL
)
{
...
@@ -248,9 +248,13 @@ int SSL_clear(SSL *s)
...
@@ -248,9 +248,13 @@ int SSL_clear(SSL *s)
read_ahead
=
RECORD_LAYER_get_read_ahead
(
&
s
->
rlayer
);
read_ahead
=
RECORD_LAYER_get_read_ahead
(
&
s
->
rlayer
);
rp
=
SSL3_BUFFER_get_buf
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
));
rp
=
SSL3_BUFFER_get_buf
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
));
rlen
=
SSL3_BUFFER_get_len
(
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
);
memset
(
&
s
->
rlayer
,
0
,
sizeof
s
->
rlayer
);
SSL3_BUFFER_set_buf
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
),
rp
);
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_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
/* 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
* previously get reset by SSL_clear...so I'll keep it that way..but is
...
@@ -619,6 +623,8 @@ void SSL_free(SSL *s)
...
@@ -619,6 +623,8 @@ void SSL_free(SSL *s)
if
(
SSL3_BUFFER_is_initialised
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
)))
if
(
SSL3_BUFFER_is_initialised
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
)))
ssl3_release_read_buffer
(
s
);
ssl3_release_read_buffer
(
s
);
if
(
SSL3_BUFFER_is_initialised
(
RECORD_LAYER_get_wbuf
(
&
s
->
rlayer
)))
ssl3_release_write_buffer
(
s
);
if
(
s
->
ctx
)
if
(
s
->
ctx
)
SSL_CTX_free
(
s
->
ctx
);
SSL_CTX_free
(
s
->
ctx
);
...
...
ssl/ssl_locl.h
浏览文件 @
ab97b2cd
...
@@ -1281,7 +1281,6 @@ typedef struct ssl3_state_st {
...
@@ -1281,7 +1281,6 @@ typedef struct ssl3_state_st {
int
empty_fragment_done
;
int
empty_fragment_done
;
/* The value of 'extra' when the buffers were initialized */
/* The value of 'extra' when the buffers were initialized */
int
init_extra
;
int
init_extra
;
SSL3_BUFFER
wbuf
;
/* write IO goes into here */
SSL3_RECORD
rrec
;
/* each decoded record goes in here */
SSL3_RECORD
rrec
;
/* each decoded record goes in here */
SSL3_RECORD
wrec
;
/* goes out from here */
SSL3_RECORD
wrec
;
/* goes out from here */
/*
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录