Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
444c3a84
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看板
提交
444c3a84
编写于
11月 28, 2003
作者:
G
Geoff Thorpe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Get rid of some signed/unsigned comparison warnings.
上级
0b352c58
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
7 deletion
+14
-7
crypto/bn/bn_gf2m.c
crypto/bn/bn_gf2m.c
+14
-7
未找到文件。
crypto/bn/bn_gf2m.c
浏览文件 @
444c3a84
...
@@ -409,8 +409,9 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[])
...
@@ -409,8 +409,9 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[])
*/
*/
int
BN_GF2m_mod
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
)
int
BN_GF2m_mod
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
)
{
{
int
ret
=
0
;
const
int
max
=
BN_num_bits
(
p
);
const
int
max
=
BN_num_bits
(
p
);
unsigned
int
*
arr
=
NULL
,
ret
=
0
;
unsigned
int
*
arr
=
NULL
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
if
(
!
ret
||
ret
>
max
)
if
(
!
ret
||
ret
>
max
)
...
@@ -483,8 +484,9 @@ int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsig
...
@@ -483,8 +484,9 @@ int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsig
*/
*/
int
BN_GF2m_mod_mul
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
int
BN_GF2m_mod_mul
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
{
{
int
ret
=
0
;
const
int
max
=
BN_num_bits
(
p
);
const
int
max
=
BN_num_bits
(
p
);
unsigned
int
*
arr
=
NULL
,
ret
=
0
;
unsigned
int
*
arr
=
NULL
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
if
(
!
ret
||
ret
>
max
)
if
(
!
ret
||
ret
>
max
)
...
@@ -534,8 +536,9 @@ int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_C
...
@@ -534,8 +536,9 @@ int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_C
*/
*/
int
BN_GF2m_mod_sqr
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
int
BN_GF2m_mod_sqr
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
{
{
int
ret
=
0
;
const
int
max
=
BN_num_bits
(
p
);
const
int
max
=
BN_num_bits
(
p
);
unsigned
int
*
arr
=
NULL
,
ret
=
0
;
unsigned
int
*
arr
=
NULL
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
if
(
!
ret
||
ret
>
max
)
if
(
!
ret
||
ret
>
max
)
...
@@ -801,8 +804,9 @@ int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsig
...
@@ -801,8 +804,9 @@ int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsig
*/
*/
int
BN_GF2m_mod_exp
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
int
BN_GF2m_mod_exp
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
{
{
int
ret
=
0
;
const
int
max
=
BN_num_bits
(
p
);
const
int
max
=
BN_num_bits
(
p
);
unsigned
int
*
arr
=
NULL
,
ret
=
0
;
unsigned
int
*
arr
=
NULL
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
if
(
!
ret
||
ret
>
max
)
if
(
!
ret
||
ret
>
max
)
...
@@ -852,8 +856,9 @@ int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_
...
@@ -852,8 +856,9 @@ int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_
*/
*/
int
BN_GF2m_mod_sqrt
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
int
BN_GF2m_mod_sqrt
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
{
{
int
ret
=
0
;
const
int
max
=
BN_num_bits
(
p
);
const
int
max
=
BN_num_bits
(
p
);
unsigned
int
*
arr
=
NULL
,
ret
=
0
;
unsigned
int
*
arr
=
NULL
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
if
(
!
ret
||
ret
>
max
)
if
(
!
ret
||
ret
>
max
)
...
@@ -958,9 +963,11 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p
...
@@ -958,9 +963,11 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p
*/
*/
int
BN_GF2m_mod_solve_quad
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
int
BN_GF2m_mod_solve_quad
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
BN_CTX
*
ctx
)
{
{
int
ret
=
0
;
const
int
max
=
BN_num_bits
(
p
);
const
int
max
=
BN_num_bits
(
p
);
unsigned
int
*
arr
=
NULL
,
ret
=
0
;
unsigned
int
*
arr
=
NULL
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
if
((
arr
=
(
unsigned
int
*
)
OPENSSL_malloc
(
sizeof
(
unsigned
int
)
*
max
))
==
NULL
)
goto
err
;
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
ret
=
BN_GF2m_poly2arr
(
p
,
arr
,
max
);
if
(
!
ret
||
ret
>
max
)
if
(
!
ret
||
ret
>
max
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录