Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
153703df
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,发现更多精彩内容 >>
提交
153703df
编写于
10月 19, 2016
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add some PACKET functions for size_t
And use them in the DTLS code Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
8051ab2b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
55 addition
and
3 deletion
+55
-3
ssl/d1_lib.c
ssl/d1_lib.c
+3
-3
ssl/packet_locl.h
ssl/packet_locl.h
+52
-0
未找到文件。
ssl/d1_lib.c
浏览文件 @
153703df
...
...
@@ -579,10 +579,10 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client)
/* Finished processing the record header, now process the message */
if
(
!
PACKET_get_1
(
&
msgpkt
,
&
msgtype
)
||
!
PACKET_get_net_3
(
&
msgpkt
,
&
msglen
)
||
!
PACKET_get_net_3
_len
(
&
msgpkt
,
&
msglen
)
||
!
PACKET_get_net_2
(
&
msgpkt
,
&
msgseq
)
||
!
PACKET_get_net_3
(
&
msgpkt
,
&
fragoff
)
||
!
PACKET_get_net_3
(
&
msgpkt
,
&
fraglen
)
||
!
PACKET_get_net_3
_len
(
&
msgpkt
,
&
fragoff
)
||
!
PACKET_get_net_3
_len
(
&
msgpkt
,
&
fraglen
)
||
!
PACKET_get_sub_packet
(
&
msgpkt
,
&
msgpayload
,
fraglen
)
||
PACKET_remaining
(
&
msgpkt
)
!=
0
)
{
SSLerr
(
SSL_F_DTLSV1_LISTEN
,
SSL_R_LENGTH_MISMATCH
);
...
...
ssl/packet_locl.h
浏览文件 @
153703df
...
...
@@ -160,6 +160,19 @@ __owur static ossl_inline int PACKET_get_net_2(PACKET *pkt, unsigned int *data)
return
1
;
}
/* Same as PACKET_get_net_2() but for a size_t */
__owur
static
ossl_inline
int
PACKET_get_net_2_len
(
PACKET
*
pkt
,
size_t
*
data
)
{
unsigned
int
i
;
int
ret
;
ret
=
PACKET_get_net_2
(
pkt
,
&
i
);
if
(
ret
)
*
data
=
(
size_t
)
i
;
return
ret
;
}
/*
* Peek ahead at 3 bytes in network order from |pkt| and store the value in
* |*data|
...
...
@@ -189,6 +202,19 @@ __owur static ossl_inline int PACKET_get_net_3(PACKET *pkt, unsigned long *data)
return
1
;
}
/* Same as PACKET_get_net_3() but for a size_t */
__owur
static
ossl_inline
int
PACKET_get_net_3_len
(
PACKET
*
pkt
,
size_t
*
data
)
{
unsigned
long
i
;
int
ret
;
ret
=
PACKET_get_net_3
(
pkt
,
&
i
);
if
(
ret
)
*
data
=
(
size_t
)
i
;
return
ret
;
}
/*
* Peek ahead at 4 bytes in network order from |pkt| and store the value in
* |*data|
...
...
@@ -219,6 +245,19 @@ __owur static ossl_inline int PACKET_get_net_4(PACKET *pkt, unsigned long *data)
return
1
;
}
/* Same as PACKET_get_net_4() but for a size_t */
__owur
static
ossl_inline
int
PACKET_get_net_4_len
(
PACKET
*
pkt
,
size_t
*
data
)
{
unsigned
long
i
;
int
ret
;
ret
=
PACKET_get_net_4
(
pkt
,
&
i
);
if
(
ret
)
*
data
=
(
size_t
)
i
;
return
ret
;
}
/* Peek ahead at 1 byte from |pkt| and store the value in |*data| */
__owur
static
ossl_inline
int
PACKET_peek_1
(
const
PACKET
*
pkt
,
unsigned
int
*
data
)
...
...
@@ -242,6 +281,19 @@ __owur static ossl_inline int PACKET_get_1(PACKET *pkt, unsigned int *data)
return
1
;
}
/* Same as PACKET_get_1() but for a size_t */
__owur
static
ossl_inline
int
PACKET_get_1_len
(
PACKET
*
pkt
,
size_t
*
data
)
{
unsigned
int
i
;
int
ret
;
ret
=
PACKET_get_1
(
pkt
,
&
i
);
if
(
ret
)
*
data
=
(
size_t
)
i
;
return
ret
;
}
/*
* Peek ahead at 4 bytes in reverse network order from |pkt| and store the value
* in |*data|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录