Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
3171bad6
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
10 个月 前同步成功
通知
8
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,体验更适合开发者的 AI 搜索 >>
提交
3171bad6
编写于
11月 18, 2016
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add an ability to find out the current write location from a WPACKET
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
c53f7355
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
2 deletion
+14
-2
ssl/packet.c
ssl/packet.c
+7
-1
ssl/packet_locl.h
ssl/packet_locl.h
+7
-1
未找到文件。
ssl/packet.c
浏览文件 @
3171bad6
...
...
@@ -62,7 +62,8 @@ int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
if
(
BUF_MEM_grow
(
pkt
->
buf
,
newlen
)
==
0
)
return
0
;
}
*
allocbytes
=
GETBUF
(
pkt
)
+
pkt
->
curr
;
if
(
allocbytes
!=
NULL
)
*
allocbytes
=
GETBUF
(
pkt
)
+
pkt
->
curr
;
return
1
;
}
...
...
@@ -376,6 +377,11 @@ int WPACKET_get_length(WPACKET *pkt, size_t *len)
return
1
;
}
unsigned
char
*
WPACKET_get_curr
(
WPACKET
*
pkt
)
{
return
GETBUF
(
pkt
)
+
pkt
->
curr
;
}
void
WPACKET_cleanup
(
WPACKET
*
pkt
)
{
WPACKET_SUB
*
sub
,
*
parent
;
...
...
ssl/packet_locl.h
浏览文件 @
3171bad6
...
...
@@ -728,7 +728,7 @@ int WPACKET_start_sub_packet(WPACKET *pkt);
/*
* Allocate bytes in the WPACKET for the output. This reserves the bytes
* and counts them as "written", but doesn't actually do the writing. A pointer
* to the allocated bytes is stored in |*allocbytes|.
* to the allocated bytes is stored in |*allocbytes|.
|allocbytes| may be NULL.
* WARNING: the allocated bytes must be filled in immediately, without further
* WPACKET_* calls. If not then the underlying buffer may be realloc'd and
* change its location.
...
...
@@ -854,6 +854,12 @@ int WPACKET_get_total_written(WPACKET *pkt, size_t *written);
*/
int
WPACKET_get_length
(
WPACKET
*
pkt
,
size_t
*
len
);
/*
* Returns a pointer to the current write location, but does not allocate any
* bytes.
*/
unsigned
char
*
WPACKET_get_curr
(
WPACKET
*
pkt
);
/* Release resources in a WPACKET if a failure has occurred. */
void
WPACKET_cleanup
(
WPACKET
*
pkt
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录