Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5c168710
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看板
提交
5c168710
编写于
7月 13, 2009
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update from 1.0.0-stable.
上级
6053ef80
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
9 deletion
+30
-9
ssl/d1_pkt.c
ssl/d1_pkt.c
+6
-1
ssl/s3_pkt.c
ssl/s3_pkt.c
+24
-8
未找到文件。
ssl/d1_pkt.c
浏览文件 @
5c168710
...
...
@@ -561,7 +561,12 @@ again:
/* read timeout is handled by dtls1_read_bytes */
if
(
n
<=
0
)
return
(
n
);
/* error or non-blocking */
OPENSSL_assert
(
s
->
packet_length
==
DTLS1_RT_HEADER_LENGTH
);
/* this packet contained a partial record, dump it */
if
(
s
->
packet_length
!=
DTLS1_RT_HEADER_LENGTH
)
{
s
->
packet_length
=
0
;
goto
again
;
}
s
->
rstate
=
SSL_ST_READ_BODY
;
...
...
ssl/s3_pkt.c
浏览文件 @
5c168710
...
...
@@ -160,7 +160,7 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
if
(
pkt
[
0
]
==
SSL3_RT_APPLICATION_DATA
&&
(
pkt
[
3
]
<<
8
|
pkt
[
4
])
>=
128
)
{
/* Note that even if packet is corrupted
/* Note that even if packet is corrupted
* and its length field is insane, we can
* only be led to wrong decision about
* whether memmove will occur or not.
...
...
@@ -176,11 +176,12 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
/* ... now we can act as if 'extend' was set */
}
/* extend reads should not span multiple packets for DTLS */
if
(
(
SSL_version
(
s
)
==
DTLS1_VERSION
||
SSL_version
(
s
)
==
DTLS1_BAD_VER
)
&&
extend
)
/* For DTLS/UDP reads should not span multiple packets
* because the read operation returns the whole packet
* at once (as long as it fits into the buffer). */
if
(
SSL_version
(
s
)
==
DTLS1_VERSION
||
SSL_version
(
s
)
==
DTLS1_BAD_VER
)
{
if
(
left
>
0
&&
n
>
left
)
if
(
left
>
0
&&
n
>
left
)
n
=
left
;
}
...
...
@@ -207,15 +208,22 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
rb
->
offset
=
len
+
align
;
}
max
=
rb
->
len
-
rb
->
offset
;
if
(
n
>
max
)
/* does not happen */
if
(
n
>
rb
->
len
-
rb
->
offset
)
/* does not happen */
{
SSLerr
(
SSL_F_SSL3_READ_N
,
ERR_R_INTERNAL_ERROR
);
return
-
1
;
}
if
(
!
s
->
read_ahead
)
max
=
n
;
/* ignore max parameter */
max
=
n
;
else
{
if
(
max
<
n
)
max
=
n
;
if
(
max
>
rb
->
len
-
rb
->
offset
)
max
=
rb
->
len
-
rb
->
offset
;
}
while
(
left
<
n
)
{
...
...
@@ -244,6 +252,14 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
return
(
i
);
}
left
+=
i
;
/* reads should *never* span multiple packets for DTLS because
* the underlying transport protocol is message oriented as opposed
* to byte oriented as in the TLS case. */
if
(
SSL_version
(
s
)
==
DTLS1_VERSION
||
SSL_version
(
s
)
==
DTLS1_BAD_VER
)
{
if
(
n
>
left
)
n
=
left
;
/* makes the while condition false */
}
}
/* done reading, now the book-keeping */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录