Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
7f7b8d68
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
8 个月 前同步成功
通知
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 搜索 >>
提交
7f7b8d68
编写于
11月 08, 2000
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
BN_CTX-related fixes.
上级
bb7e632a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
3 deletion
+13
-3
CHANGES
CHANGES
+4
-0
crypto/bn/bn.h
crypto/bn/bn.h
+1
-1
crypto/bn/bn_ctx.c
crypto/bn/bn_ctx.c
+6
-0
crypto/bn/bn_div.c
crypto/bn/bn_div.c
+2
-2
未找到文件。
CHANGES
浏览文件 @
7f7b8d68
...
...
@@ -4,6 +4,10 @@
Changes between 0.9.6 and 0.9.7 [xx XXX 2000]
*) Increase BN_CTX_NUM (the number of BIGNUMs in a BN_CTX) to 16.
The previous value, 12, was not always sufficient for BN_mod_exp().
[Bodo Moeller]
*) Make DSO load along a path given through an environment variable
(SHLIB_PATH) with shl_load().
[Richard Levitte]
...
...
crypto/bn/bn.h
浏览文件 @
7f7b8d68
...
...
@@ -239,7 +239,7 @@ typedef struct bignum_st
}
BIGNUM
;
/* Used for temp variables */
#define BN_CTX_NUM 1
2
#define BN_CTX_NUM 1
6
#define BN_CTX_NUM_POS 12
typedef
struct
bignum_ctx
{
...
...
crypto/bn/bn_ctx.c
浏览文件 @
7f7b8d68
...
...
@@ -112,8 +112,14 @@ void BN_CTX_start(BN_CTX *ctx)
ctx
->
depth
++
;
}
BIGNUM
*
BN_CTX_get
(
BN_CTX
*
ctx
)
{
/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,
* make sure that if BN_CTX_get fails once it will return NULL again
* until BN_CTX_end is called. (This is so that callers have to check
* only the last return value.)
*/
if
(
ctx
->
depth
>
BN_CTX_NUM_POS
||
ctx
->
tos
>=
BN_CTX_NUM
)
{
if
(
!
ctx
->
too_many
)
...
...
crypto/bn/bn_div.c
浏览文件 @
7f7b8d68
...
...
@@ -180,13 +180,13 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
BN_CTX_start
(
ctx
);
tmp
=
BN_CTX_get
(
ctx
);
tmp
->
neg
=
0
;
snum
=
BN_CTX_get
(
ctx
);
sdiv
=
BN_CTX_get
(
ctx
);
if
(
dv
==
NULL
)
res
=
BN_CTX_get
(
ctx
);
else
res
=
dv
;
if
(
res
==
NULL
)
goto
err
;
if
(
sdiv
==
NULL
||
res
==
NULL
)
goto
err
;
tmp
->
neg
=
0
;
/* First we normalise the numbers */
norm_shift
=
BN_BITS2
-
((
BN_num_bits
(
divisor
))
%
BN_BITS2
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录