Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
8e8972bb
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看板
提交
8e8972bb
编写于
24年前
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes to various ASN1_INTEGER routines for negative case.
Enhance s2i_ASN1_INTEGER().
上级
57108f0a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
6 deletion
+45
-6
CHANGES
CHANGES
+8
-0
apps/ocsp.c
apps/ocsp.c
+1
-1
crypto/asn1/a_int.c
crypto/asn1/a_int.c
+6
-0
crypto/asn1/f_int.c
crypto/asn1/f_int.c
+7
-1
crypto/x509v3/v3_utl.c
crypto/x509v3/v3_utl.c
+23
-4
未找到文件。
CHANGES
浏览文件 @
8e8972bb
...
...
@@ -3,6 +3,14 @@
Changes between 0.9.6 and 0.9.7 [xx XXX 2000]
*) Fixes to BN_to_ASN1_INTEGER when bn is zero. This would previously
result in a zero length in the ASN1_INTEGER structure which was
not consistent with the structure when d2i_ASN1_INTEGER() was used
and would cause ASN1_INTEGER_cmp() to fail. Enhance s2i_ASN1_INTEGER()
to cope with hex and negative integers. Fix bug in i2a_ASN1_INTEGER()
where it did not print out a minus for negative ASN1_INTEGER.
[Steve Henson]
*) Fix 'openssl passwd -1'.
[Bodo Moeller]
...
...
This diff is collapsed.
Click to expand it.
apps/ocsp.c
浏览文件 @
8e8972bb
...
...
@@ -585,7 +585,7 @@ static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
if
(
status
!=
V_OCSP_CERTSTATUS_REVOKED
)
continue
;
if
(
reason
>
0
)
if
(
reason
!=
-
1
)
BIO_printf
(
out
,
"
\t
Reason: %s
\n
"
,
OCSP_crl_reason_str
(
reason
));
...
...
This diff is collapsed.
Click to expand it.
crypto/asn1/a_int.c
浏览文件 @
8e8972bb
...
...
@@ -399,6 +399,12 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
len
=
((
j
==
0
)
?
0
:
((
j
/
8
)
+
1
));
ret
->
data
=
(
unsigned
char
*
)
OPENSSL_malloc
(
len
+
4
);
ret
->
length
=
BN_bn2bin
(
bn
,
ret
->
data
);
/* Correct zero case */
if
(
!
ret
->
length
)
{
ret
->
data
[
0
]
=
0
;
ret
->
length
=
1
;
}
return
(
ret
);
err:
if
(
ret
!=
ai
)
M_ASN1_INTEGER_free
(
ret
);
...
...
This diff is collapsed.
Click to expand it.
crypto/asn1/f_int.c
浏览文件 @
8e8972bb
...
...
@@ -69,10 +69,16 @@ int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a)
if
(
a
==
NULL
)
return
(
0
);
if
(
a
->
type
&
V_ASN1_NEG
)
{
if
(
BIO_write
(
bp
,
"-"
,
1
)
!=
1
)
goto
err
;
n
=
1
;
}
if
(
a
->
length
==
0
)
{
if
(
BIO_write
(
bp
,
"00"
,
2
)
!=
2
)
goto
err
;
n
=
2
;
n
+=
2
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
crypto/x509v3/v3_utl.c
浏览文件 @
8e8972bb
...
...
@@ -154,21 +154,40 @@ ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)
{
BIGNUM
*
bn
=
NULL
;
ASN1_INTEGER
*
aint
;
int
isneg
,
ishex
;
int
ret
;
bn
=
BN_new
();
if
(
!
value
)
{
if
(
!
value
)
{
X509V3err
(
X509V3_F_S2I_ASN1_INTEGER
,
X509V3_R_INVALID_NULL_VALUE
);
return
0
;
}
if
(
!
BN_dec2bn
(
&
bn
,
value
))
{
if
(
value
[
0
]
==
'-'
)
{
value
++
;
isneg
=
1
;
}
else
isneg
=
0
;
if
(
value
[
0
]
==
'0'
&&
((
value
[
1
]
==
'x'
)
||
(
value
[
1
]
==
'X'
)))
{
value
+=
2
;
ishex
=
1
;
}
else
ishex
=
0
;
if
(
ishex
)
ret
=
BN_hex2bn
(
&
bn
,
value
);
else
ret
=
BN_dec2bn
(
&
bn
,
value
);
if
(
!
ret
)
{
X509V3err
(
X509V3_F_S2I_ASN1_INTEGER
,
X509V3_R_BN_DEC2BN_ERROR
);
return
0
;
}
if
(
!
(
aint
=
BN_to_ASN1_INTEGER
(
bn
,
NULL
)))
{
if
(
isneg
&&
BN_is_zero
(
bn
))
isneg
=
0
;
aint
=
BN_to_ASN1_INTEGER
(
bn
,
NULL
);
BN_free
(
bn
);
if
(
!
aint
)
{
X509V3err
(
X509V3_F_S2I_ASN1_INTEGER
,
X509V3_R_BN_TO_ASN1_INTEGER_ERROR
);
return
0
;
}
BN_free
(
bn
)
;
if
(
isneg
)
aint
->
type
|=
V_ASN1_NEG
;
return
aint
;
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部