Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
390c5795
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看板
提交
390c5795
编写于
12月 02, 2011
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix BIO_f_buffer().
Submitted by: Adam Langley Reviewed by: Bodo Moeller
上级
07981709
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
7 deletion
+25
-7
CHANGES
CHANGES
+8
-0
crypto/bio/bf_buff.c
crypto/bio/bf_buff.c
+8
-7
crypto/bio/bio.h
crypto/bio/bio.h
+9
-0
未找到文件。
CHANGES
浏览文件 @
390c5795
...
...
@@ -490,6 +490,10 @@
Changes between 1.0.0e and 1.0.0f [xx XXX xxxx]
*) Fix the BIO_f_buffer() implementation (which was mixing different
interpretations of the '..._len' fields).
[Adam Langley (Google)]
*) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than
BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent
threads won't reuse the same blinding coefficients.
...
...
@@ -1410,6 +1414,10 @@
Changes between 0.9.8r and 0.9.8s [xx XXX xxxx]
*) Fix the BIO_f_buffer() implementation (which was mixing different
interpretations of the '..._len' fields).
[Adam Langley (Google)]
*) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than
BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent
threads won't reuse the same blinding coefficients.
...
...
crypto/bio/bf_buff.c
浏览文件 @
390c5795
...
...
@@ -209,7 +209,7 @@ start:
/* add to buffer and return */
if
(
i
>=
inl
)
{
memcpy
(
&
(
ctx
->
obuf
[
ctx
->
obuf_len
]),
in
,
inl
);
memcpy
(
&
(
ctx
->
obuf
[
ctx
->
obuf_
off
+
ctx
->
obuf_
len
]),
in
,
inl
);
ctx
->
obuf_len
+=
inl
;
return
(
num
+
inl
);
}
...
...
@@ -219,7 +219,7 @@ start:
{
if
(
i
>
0
)
/* lets fill it up if we can */
{
memcpy
(
&
(
ctx
->
obuf
[
ctx
->
obuf_len
]),
in
,
i
);
memcpy
(
&
(
ctx
->
obuf
[
ctx
->
obuf_
off
+
ctx
->
obuf_
len
]),
in
,
i
);
in
+=
i
;
inl
-=
i
;
num
+=
i
;
...
...
@@ -294,9 +294,9 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
case
BIO_C_GET_BUFF_NUM_LINES
:
ret
=
0
;
p1
=
ctx
->
ibuf
;
for
(
i
=
ctx
->
ibuf_off
;
i
<
ctx
->
ibuf_len
;
i
++
)
for
(
i
=
0
;
i
<
ctx
->
ibuf_len
;
i
++
)
{
if
(
p1
[
i
]
==
'\n'
)
ret
++
;
if
(
p1
[
ctx
->
ibuf_off
+
i
]
==
'\n'
)
ret
++
;
}
break
;
case
BIO_CTRL_WPENDING
:
...
...
@@ -399,17 +399,18 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
for
(;;)
{
BIO_clear_retry_flags
(
b
);
if
(
ctx
->
obuf_len
>
ctx
->
obuf_off
)
if
(
ctx
->
obuf_len
>
0
)
{
r
=
BIO_write
(
b
->
next_bio
,
&
(
ctx
->
obuf
[
ctx
->
obuf_off
]),
ctx
->
obuf_len
-
ctx
->
obuf_off
);
ctx
->
obuf_len
);
#if 0
fprintf(stderr,"FLUSH [%3d] %3d -> %3d\n",ctx->obuf_off,ctx->obuf_len
-ctx->obuf_off
,r);
fprintf(stderr,"FLUSH [%3d] %3d -> %3d\n",ctx->obuf_off,ctx->obuf_len,r);
#endif
BIO_copy_next_retry
(
b
);
if
(
r
<=
0
)
return
((
long
)
r
);
ctx
->
obuf_off
+=
r
;
ctx
->
obuf_len
-=
r
;
}
else
{
...
...
crypto/bio/bio.h
浏览文件 @
390c5795
...
...
@@ -306,6 +306,15 @@ DECLARE_STACK_OF(BIO)
typedef
struct
bio_f_buffer_ctx_struct
{
/* Buffers are setup like this:
*
* <---------------------- size ----------------------->
* +---------------------------------------------------+
* | consumed | remaining | free space |
* +---------------------------------------------------+
* <-- off --><------- len ------->
*/
/* BIO *bio; */
/* this is now in the BIO struct */
int
ibuf_size
;
/* how big is the input buffer */
int
obuf_size
;
/* how big is the output buffer */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录