Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
109f8b5d
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看板
提交
109f8b5d
编写于
1月 27, 2016
作者:
V
Viktor Dukhovni
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Comment side-effect only calls of X509_check_purpose
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
b4f35e5e
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
8 addition
and
1 deletion
+8
-1
crypto/cms/cms_sd.c
crypto/cms/cms_sd.c
+1
-0
crypto/ts/ts_rsp_sign.c
crypto/ts/ts_rsp_sign.c
+1
-0
crypto/x509/x509_trs.c
crypto/x509/x509_trs.c
+1
-0
crypto/x509v3/pcy_tree.c
crypto/x509v3/pcy_tree.c
+0
-1
crypto/x509v3/v3_purp.c
crypto/x509v3/v3_purp.c
+5
-0
未找到文件。
crypto/cms/cms_sd.c
浏览文件 @
109f8b5d
...
@@ -280,6 +280,7 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
...
@@ -280,6 +280,7 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
si
=
M_ASN1_new_of
(
CMS_SignerInfo
);
si
=
M_ASN1_new_of
(
CMS_SignerInfo
);
if
(
!
si
)
if
(
!
si
)
goto
merr
;
goto
merr
;
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose
(
signer
,
-
1
,
-
1
);
X509_check_purpose
(
signer
,
-
1
,
-
1
);
CRYPTO_add
(
&
pk
->
references
,
1
,
CRYPTO_LOCK_EVP_PKEY
);
CRYPTO_add
(
&
pk
->
references
,
1
,
CRYPTO_LOCK_EVP_PKEY
);
...
...
crypto/ts/ts_rsp_sign.c
浏览文件 @
109f8b5d
...
@@ -793,6 +793,7 @@ static ESS_CERT_ID *ess_CERT_ID_new_init(X509 *cert, int issuer_needed)
...
@@ -793,6 +793,7 @@ static ESS_CERT_ID *ess_CERT_ID_new_init(X509 *cert, int issuer_needed)
GENERAL_NAME
*
name
=
NULL
;
GENERAL_NAME
*
name
=
NULL
;
unsigned
char
cert_sha1
[
SHA_DIGEST_LENGTH
];
unsigned
char
cert_sha1
[
SHA_DIGEST_LENGTH
];
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose
(
cert
,
-
1
,
0
);
X509_check_purpose
(
cert
,
-
1
,
0
);
if
((
cid
=
ESS_CERT_ID_new
())
==
NULL
)
if
((
cid
=
ESS_CERT_ID_new
())
==
NULL
)
goto
err
;
goto
err
;
...
...
crypto/x509/x509_trs.c
浏览文件 @
109f8b5d
...
@@ -283,6 +283,7 @@ static int trust_1oid(X509_TRUST *trust, X509 *x, int flags)
...
@@ -283,6 +283,7 @@ static int trust_1oid(X509_TRUST *trust, X509 *x, int flags)
static
int
trust_compat
(
X509_TRUST
*
trust
,
X509
*
x
,
int
flags
)
static
int
trust_compat
(
X509_TRUST
*
trust
,
X509
*
x
,
int
flags
)
{
{
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose
(
x
,
-
1
,
0
);
X509_check_purpose
(
x
,
-
1
,
0
);
if
(
x
->
ex_flags
&
EXFLAG_SS
)
if
(
x
->
ex_flags
&
EXFLAG_SS
)
return
X509_TRUST_TRUSTED
;
return
X509_TRUST_TRUSTED
;
...
...
crypto/x509v3/pcy_tree.c
浏览文件 @
109f8b5d
...
@@ -186,7 +186,6 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
...
@@ -186,7 +186,6 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
uint32_t
ex_flags
;
uint32_t
ex_flags
;
x
=
sk_X509_value
(
certs
,
i
);
x
=
sk_X509_value
(
certs
,
i
);
ex_flags
=
X509_get_extension_flags
(
x
);
ex_flags
=
X509_get_extension_flags
(
x
);
X509_check_purpose
(
x
,
-
1
,
-
1
);
cache
=
policy_cache_set
(
x
);
cache
=
policy_cache_set
(
x
);
/* If cache NULL something bad happened: return immediately */
/* If cache NULL something bad happened: return immediately */
if
(
cache
==
NULL
)
if
(
cache
==
NULL
)
...
...
crypto/x509v3/v3_purp.c
浏览文件 @
109f8b5d
...
@@ -132,6 +132,7 @@ int X509_check_purpose(X509 *x, int id, int ca)
...
@@ -132,6 +132,7 @@ int X509_check_purpose(X509 *x, int id, int ca)
x509v3_cache_extensions
(
x
);
x509v3_cache_extensions
(
x
);
CRYPTO_w_unlock
(
CRYPTO_LOCK_X509
);
CRYPTO_w_unlock
(
CRYPTO_LOCK_X509
);
}
}
/* Return if side-effect only call */
if
(
id
==
-
1
)
if
(
id
==
-
1
)
return
1
;
return
1
;
idx
=
X509_PURPOSE_get_by_id
(
id
);
idx
=
X509_PURPOSE_get_by_id
(
id
);
...
@@ -850,12 +851,14 @@ int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid)
...
@@ -850,12 +851,14 @@ int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid)
uint32_t
X509_get_extension_flags
(
X509
*
x
)
uint32_t
X509_get_extension_flags
(
X509
*
x
)
{
{
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose
(
x
,
-
1
,
-
1
);
X509_check_purpose
(
x
,
-
1
,
-
1
);
return
x
->
ex_flags
;
return
x
->
ex_flags
;
}
}
uint32_t
X509_get_key_usage
(
X509
*
x
)
uint32_t
X509_get_key_usage
(
X509
*
x
)
{
{
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose
(
x
,
-
1
,
-
1
);
X509_check_purpose
(
x
,
-
1
,
-
1
);
if
(
x
->
ex_flags
&
EXFLAG_KUSAGE
)
if
(
x
->
ex_flags
&
EXFLAG_KUSAGE
)
return
x
->
ex_kusage
;
return
x
->
ex_kusage
;
...
@@ -864,6 +867,7 @@ uint32_t X509_get_key_usage(X509 *x)
...
@@ -864,6 +867,7 @@ uint32_t X509_get_key_usage(X509 *x)
uint32_t
X509_get_extended_key_usage
(
X509
*
x
)
uint32_t
X509_get_extended_key_usage
(
X509
*
x
)
{
{
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose
(
x
,
-
1
,
-
1
);
X509_check_purpose
(
x
,
-
1
,
-
1
);
if
(
x
->
ex_flags
&
EXFLAG_XKUSAGE
)
if
(
x
->
ex_flags
&
EXFLAG_XKUSAGE
)
return
x
->
ex_xkusage
;
return
x
->
ex_xkusage
;
...
@@ -872,6 +876,7 @@ uint32_t X509_get_extended_key_usage(X509 *x)
...
@@ -872,6 +876,7 @@ uint32_t X509_get_extended_key_usage(X509 *x)
const
ASN1_OCTET_STRING
*
X509_get0_subject_key_id
(
X509
*
x
)
const
ASN1_OCTET_STRING
*
X509_get0_subject_key_id
(
X509
*
x
)
{
{
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose
(
x
,
-
1
,
-
1
);
X509_check_purpose
(
x
,
-
1
,
-
1
);
return
x
->
skid
;
return
x
->
skid
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录