Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
bbcd6d7f
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看板
提交
bbcd6d7f
编写于
2月 02, 2015
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Provide RECORD_LAYER_set_data function
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
f161995e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
19 deletion
+25
-19
ssl/record/rec_layer.h
ssl/record/rec_layer.h
+1
-0
ssl/record/s3_pkt.c
ssl/record/s3_pkt.c
+16
-0
ssl/record/ssl3_buffer.c
ssl/record/ssl3_buffer.c
+1
-1
ssl/record/ssl3_buffer.h
ssl/record/ssl3_buffer.h
+1
-1
ssl/s23_clnt.c
ssl/s23_clnt.c
+2
-7
ssl/s23_srvr.c
ssl/s23_srvr.c
+4
-10
未找到文件。
ssl/record/rec_layer.h
浏览文件 @
bbcd6d7f
...
...
@@ -170,6 +170,7 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl);
void
RECORD_LAYER_release
(
RECORD_LAYER
*
rl
);
int
RECORD_LAYER_read_pending
(
RECORD_LAYER
*
rl
);
int
RECORD_LAYER_write_pending
(
RECORD_LAYER
*
rl
);
int
RECORD_LAYER_set_data
(
RECORD_LAYER
*
rl
,
const
unsigned
char
*
buf
,
int
len
);
__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
浏览文件 @
bbcd6d7f
...
...
@@ -178,6 +178,22 @@ int RECORD_LAYER_write_pending(RECORD_LAYER *rl)
return
SSL3_BUFFER_get_left
(
&
rl
->
wbuf
)
!=
0
;
}
int
RECORD_LAYER_set_data
(
RECORD_LAYER
*
rl
,
const
unsigned
char
*
buf
,
int
len
)
{
rl
->
s
->
packet_length
=
len
;
if
(
len
!=
0
)
{
rl
->
s
->
rstate
=
SSL_ST_READ_HEADER
;
if
(
!
SSL3_BUFFER_is_initialised
(
&
rl
->
rbuf
))
if
(
!
ssl3_setup_read_buffer
(
rl
->
s
))
return
0
;
}
rl
->
s
->
packet
=
SSL3_BUFFER_get_buf
(
&
rl
->
rbuf
);
SSL3_BUFFER_set_data
(
&
rl
->
rbuf
,
buf
,
len
);
return
1
;
}
int
ssl3_read_n
(
SSL
*
s
,
int
n
,
int
max
,
int
extend
)
{
/*
...
...
ssl/record/ssl3_buffer.c
浏览文件 @
bbcd6d7f
...
...
@@ -111,7 +111,7 @@
#include "../ssl_locl.h"
void
SSL3_BUFFER_set_data
(
SSL3_BUFFER
*
b
,
unsigned
char
*
d
,
int
n
)
void
SSL3_BUFFER_set_data
(
SSL3_BUFFER
*
b
,
const
unsigned
char
*
d
,
int
n
)
{
if
(
d
!=
NULL
)
memcpy
(
b
->
buf
,
d
,
n
);
...
...
ssl/record/ssl3_buffer.h
浏览文件 @
bbcd6d7f
...
...
@@ -127,7 +127,7 @@ typedef struct ssl3_buffer_st {
#define SSL3_BUFFER_get_left(b) ((b)->left)
#define SSL3_BUFFER_is_initialised(b) ((b)->buf != NULL)
void
SSL3_BUFFER_set_data
(
SSL3_BUFFER
*
b
,
unsigned
char
*
d
,
int
n
);
void
SSL3_BUFFER_set_data
(
SSL3_BUFFER
*
b
,
const
unsigned
char
*
d
,
int
n
);
void
SSL3_BUFFER_release
(
SSL3_BUFFER
*
b
);
__owur
int
ssl3_setup_buffers
(
SSL
*
s
);
__owur
int
ssl3_setup_read_buffer
(
SSL
*
s
);
...
...
ssl/s23_clnt.c
浏览文件 @
bbcd6d7f
...
...
@@ -573,13 +573,8 @@ static int ssl23_get_server_hello(SSL *s)
/*
* put the 7 bytes we have read into the input buffer for SSLv3
*/
s
->
rstate
=
SSL_ST_READ_HEADER
;
s
->
packet_length
=
n
;
if
(
!
SSL3_BUFFER_is_initialised
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
)))
if
(
!
ssl3_setup_read_buffer
(
s
))
goto
err
;
s
->
packet
=
SSL3_BUFFER_get_buf
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
));
SSL3_BUFFER_set_data
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
),
buf
,
n
);
if
(
!
RECORD_LAYER_set_data
(
&
s
->
rlayer
,
buf
,
n
))
goto
err
;
s
->
handshake_func
=
s
->
method
->
ssl_connect
;
}
else
{
...
...
ssl/s23_srvr.c
浏览文件 @
bbcd6d7f
...
...
@@ -556,17 +556,11 @@ int ssl23_get_client_hello(SSL *s)
/*
* put the 'n' bytes we have read into the input buffer for SSLv3
*/
s
->
rstate
=
SSL_ST_READ_HEADER
;
s
->
packet_length
=
n
;
if
(
!
SSL3_BUFFER_is_initialised
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
)))
if
(
!
ssl3_setup_read_buffer
(
s
))
goto
err
;
s
->
packet
=
SSL3_BUFFER_get_buf
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
));
SSL3_BUFFER_set_data
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
),
buf
,
n
);
if
(
!
RECORD_LAYER_set_data
(
&
s
->
rlayer
,
buf
,
n
))
goto
err
;
}
else
{
s
->
packet_length
=
0
;
SSL3_BUFFER_set_data
(
RECORD_LAYER_get_rbuf
(
&
s
->
rlayer
),
NULL
,
0
)
;
if
(
!
RECORD_LAYER_set_data
(
&
s
->
rlayer
,
NULL
,
0
))
goto
err
;
}
s
->
handshake_func
=
s
->
method
->
ssl_accept
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录