Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c962479b
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看板
提交
c962479b
编写于
4月 21, 2001
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix ASN1 bug when decoding OTHER type. Various S/MIME DSA related fixes.
上级
b31ccc36
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
37 addition
and
4 deletion
+37
-4
CHANGES
CHANGES
+11
-0
crypto/asn1/tasn_dec.c
crypto/asn1/tasn_dec.c
+7
-2
crypto/asn1/x_pubkey.c
crypto/asn1/x_pubkey.c
+1
-1
crypto/dsa/dsa.h
crypto/dsa/dsa.h
+2
-1
crypto/dsa/dsa_err.c
crypto/dsa/dsa_err.c
+1
-0
crypto/dsa/dsa_ossl.c
crypto/dsa/dsa_ossl.c
+15
-0
未找到文件。
CHANGES
浏览文件 @
c962479b
...
@@ -11,6 +11,16 @@
...
@@ -11,6 +11,16 @@
*) applies to 0.9.6a (/0.9.6b) and 0.9.7
*) applies to 0.9.6a (/0.9.6b) and 0.9.7
+) applies to 0.9.7 only
+) applies to 0.9.7 only
+) Fix various bugs related to DSA S/MIME verification. Handle missing
parameters in DSA public key structures and return an error in the
DSA routines if parameters are absent.
[Steve Henson]
+) Fix ASN1 decoder when decoding type ANY and V_ASN1_OTHER: since this
needs to match any other type at all we need to manually clear the
tag cache.
[Steve Henson]
+) Changes to the "openssl engine" utility to include;
+) Changes to the "openssl engine" utility to include;
- verbosity levels ('-v', '-vv', and '-vvv') that provide information
- verbosity levels ('-v', '-vv', and '-vvv') that provide information
about an ENGINE's available control commands.
about an ENGINE's available control commands.
...
@@ -88,6 +98,7 @@
...
@@ -88,6 +98,7 @@
that they do not hold after the first thread unsets add_do_not_lock).
that they do not hold after the first thread unsets add_do_not_lock).
[Bodo Moeller]
[Bodo Moeller]
>>>>>>> 1.823
+) Implement binary inversion algorithm for BN_mod_inverse in addition
+) Implement binary inversion algorithm for BN_mod_inverse in addition
to the algorithm using long divison. The binary algorithm can be
to the algorithm using long divison. The binary algorithm can be
used only if the modulus is odd. On 32-bit systems, it is faster
used only if the modulus is odd. On 32-bit systems, it is faster
...
...
crypto/asn1/tasn_dec.c
浏览文件 @
c962479b
...
@@ -611,8 +611,13 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, unsigned char **in, long inl
...
@@ -611,8 +611,13 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, unsigned char **in, long inl
}
else
if
(
ret
==
-
1
)
return
-
1
;
}
else
if
(
ret
==
-
1
)
return
-
1
;
/* SEQUENCE, SET and "OTHER" are left in encoded form */
/* SEQUENCE, SET and "OTHER" are left in encoded form */
if
((
utype
==
V_ASN1_SEQUENCE
)
||
(
utype
==
V_ASN1_SET
)
||
(
utype
==
V_ASN1_OTHER
))
{
if
((
utype
==
V_ASN1_SEQUENCE
)
||
(
utype
==
V_ASN1_SET
)
||
(
utype
==
V_ASN1_OTHER
))
{
/* Clear context cache for type OTHER because the auto clear when
* we have a exact match wont work
*/
if
(
utype
==
V_ASN1_OTHER
)
{
asn1_tlc_clear
(
ctx
);
/* SEQUENCE and SET must be constructed */
/* SEQUENCE and SET must be constructed */
if
((
utype
!=
V_ASN1_OTHER
)
&&
!
cst
)
{
}
else
if
(
!
cst
)
{
ASN1err
(
ASN1_F_ASN1_D2I_EX_PRIMITIVE
,
ASN1_R_TYPE_NOT_CONSTRUCTED
);
ASN1err
(
ASN1_F_ASN1_D2I_EX_PRIMITIVE
,
ASN1_R_TYPE_NOT_CONSTRUCTED
);
return
0
;
return
0
;
}
}
...
@@ -899,7 +904,7 @@ static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *i
...
@@ -899,7 +904,7 @@ static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *i
}
}
}
}
}
}
if
(
i
&
0x80
)
{
if
(
i
&
0x80
)
{
ASN1err
(
ASN1_F_ASN1_CHECK_TLEN
,
ASN1_R_BAD_OBJECT_HEADER
);
ASN1err
(
ASN1_F_ASN1_CHECK_TLEN
,
ASN1_R_BAD_OBJECT_HEADER
);
asn1_tlc_clear
(
ctx
);
asn1_tlc_clear
(
ctx
);
...
...
crypto/asn1/x_pubkey.c
浏览文件 @
c962479b
...
@@ -198,7 +198,7 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
...
@@ -198,7 +198,7 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
a
=
key
->
algor
;
a
=
key
->
algor
;
if
(
ret
->
type
==
EVP_PKEY_DSA
)
if
(
ret
->
type
==
EVP_PKEY_DSA
)
{
{
if
(
a
->
parameter
->
type
==
V_ASN1_SEQUENCE
)
if
(
a
->
parameter
&&
(
a
->
parameter
->
type
==
V_ASN1_SEQUENCE
)
)
{
{
ret
->
pkey
.
dsa
->
write_params
=
0
;
ret
->
pkey
.
dsa
->
write_params
=
0
;
cp
=
p
=
a
->
parameter
->
value
.
sequence
->
data
;
cp
=
p
=
a
->
parameter
->
value
.
sequence
->
data
;
...
...
crypto/dsa/dsa.h
浏览文件 @
c962479b
...
@@ -229,6 +229,7 @@ DH *DSA_dup_DH(const DSA *r);
...
@@ -229,6 +229,7 @@ DH *DSA_dup_DH(const DSA *r);
/* The following lines are auto generated by the script mkerr.pl. Any changes
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
* made after this point may be overwritten when the script is next run.
*/
*/
void
ERR_load_DSA_strings
(
void
);
/* Error codes for the DSA functions. */
/* Error codes for the DSA functions. */
...
@@ -250,9 +251,9 @@ DH *DSA_dup_DH(const DSA *r);
...
@@ -250,9 +251,9 @@ DH *DSA_dup_DH(const DSA *r);
/* Reason codes. */
/* Reason codes. */
#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100
#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100
#define DSA_R_MISSING_PARAMETERS 101
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
#endif
#endif
crypto/dsa/dsa_err.c
浏览文件 @
c962479b
...
@@ -86,6 +86,7 @@ static ERR_STRING_DATA DSA_str_functs[]=
...
@@ -86,6 +86,7 @@ static ERR_STRING_DATA DSA_str_functs[]=
static
ERR_STRING_DATA
DSA_str_reasons
[]
=
static
ERR_STRING_DATA
DSA_str_reasons
[]
=
{
{
{
DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE
,
"data too large for key size"
},
{
DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE
,
"data too large for key size"
},
{
DSA_R_MISSING_PARAMETERS
,
"missing parameters"
},
{
0
,
NULL
}
{
0
,
NULL
}
};
};
...
...
crypto/dsa/dsa_ossl.c
浏览文件 @
c962479b
...
@@ -106,6 +106,11 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
...
@@ -106,6 +106,11 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
int
i
,
reason
=
ERR_R_BN_LIB
;
int
i
,
reason
=
ERR_R_BN_LIB
;
DSA_SIG
*
ret
=
NULL
;
DSA_SIG
*
ret
=
NULL
;
if
(
!
dsa
->
p
||
!
dsa
->
q
||
!
dsa
->
g
)
{
reason
=
DSA_R_MISSING_PARAMETERS
;
goto
err
;
}
BN_init
(
&
m
);
BN_init
(
&
m
);
BN_init
(
&
xr
);
BN_init
(
&
xr
);
s
=
BN_new
();
s
=
BN_new
();
...
@@ -168,6 +173,11 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
...
@@ -168,6 +173,11 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
BIGNUM
k
,
*
kinv
=
NULL
,
*
r
=
NULL
;
BIGNUM
k
,
*
kinv
=
NULL
,
*
r
=
NULL
;
int
ret
=
0
;
int
ret
=
0
;
if
(
!
dsa
->
p
||
!
dsa
->
q
||
!
dsa
->
g
)
{
DSAerr
(
DSA_F_DSA_SIGN_SETUP
,
DSA_R_MISSING_PARAMETERS
);
return
0
;
}
if
(
ctx_in
==
NULL
)
if
(
ctx_in
==
NULL
)
{
{
if
((
ctx
=
BN_CTX_new
())
==
NULL
)
goto
err
;
if
((
ctx
=
BN_CTX_new
())
==
NULL
)
goto
err
;
...
@@ -225,6 +235,11 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
...
@@ -225,6 +235,11 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
BIGNUM
u1
,
u2
,
t1
;
BIGNUM
u1
,
u2
,
t1
;
BN_MONT_CTX
*
mont
=
NULL
;
BN_MONT_CTX
*
mont
=
NULL
;
int
ret
=
-
1
;
int
ret
=
-
1
;
if
(
!
dsa
->
p
||
!
dsa
->
q
||
!
dsa
->
g
)
{
DSAerr
(
DSA_F_DSA_DO_VERIFY
,
DSA_R_MISSING_PARAMETERS
);
return
-
1
;
}
if
((
ctx
=
BN_CTX_new
())
==
NULL
)
goto
err
;
if
((
ctx
=
BN_CTX_new
())
==
NULL
)
goto
err
;
BN_init
(
&
u1
);
BN_init
(
&
u1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录