Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
d19a50c9
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
9
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看板
提交
d19a50c9
编写于
9月 22, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New function X509_get0_subject_key_id()
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
2c81e476
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
6 deletion
+16
-6
crypto/cms/cms_lib.c
crypto/cms/cms_lib.c
+8
-6
crypto/x509v3/v3_purp.c
crypto/x509v3/v3_purp.c
+7
-0
include/openssl/x509v3.h
include/openssl/x509v3.h
+1
-0
未找到文件。
crypto/cms/cms_lib.c
浏览文件 @
d19a50c9
...
...
@@ -585,10 +585,11 @@ int cms_ias_cert_cmp(CMS_IssuerAndSerialNumber *ias, X509 *cert)
int
cms_keyid_cert_cmp
(
ASN1_OCTET_STRING
*
keyid
,
X509
*
cert
)
{
X509_check_purpose
(
cert
,
-
1
,
-
1
);
if
(
!
cert
->
skid
)
const
ASN1_OCTET_STRING
*
cert_keyid
=
X509_get0_subject_key_id
(
cert
);
if
(
cert_keyid
==
NULL
)
return
-
1
;
return
ASN1_OCTET_STRING_cmp
(
keyid
,
cert
->
sk
id
);
return
ASN1_OCTET_STRING_cmp
(
keyid
,
cert
_key
id
);
}
int
cms_set1_ias
(
CMS_IssuerAndSerialNumber
**
pias
,
X509
*
cert
)
...
...
@@ -613,12 +614,13 @@ int cms_set1_ias(CMS_IssuerAndSerialNumber **pias, X509 *cert)
int
cms_set1_keyid
(
ASN1_OCTET_STRING
**
pkeyid
,
X509
*
cert
)
{
ASN1_OCTET_STRING
*
keyid
=
NULL
;
X509_check_purpose
(
cert
,
-
1
,
-
1
);
if
(
!
cert
->
skid
)
{
const
ASN1_OCTET_STRING
*
cert_keyid
;
cert_keyid
=
X509_get0_subject_key_id
(
cert
);
if
(
cert_keyid
==
NULL
)
{
CMSerr
(
CMS_F_CMS_SET1_KEYID
,
CMS_R_CERTIFICATE_HAS_NO_KEYID
);
return
0
;
}
keyid
=
ASN1_STRING_dup
(
cert
->
sk
id
);
keyid
=
ASN1_STRING_dup
(
cert
_key
id
);
if
(
!
keyid
)
{
CMSerr
(
CMS_F_CMS_SET1_KEYID
,
ERR_R_MALLOC_FAILURE
);
return
0
;
...
...
crypto/x509v3/v3_purp.c
浏览文件 @
d19a50c9
...
...
@@ -62,6 +62,7 @@
#include "internal/numbers.h"
#include <openssl/x509v3.h>
#include <openssl/x509_vfy.h>
#include "internal/x509_int.h"
static
void
x509v3_cache_extensions
(
X509
*
x
);
...
...
@@ -868,3 +869,9 @@ uint32_t X509_get_extended_key_usage(X509 *x)
return
x
->
ex_xkusage
;
return
UINT32_MAX
;
}
const
ASN1_OCTET_STRING
*
X509_get0_subject_key_id
(
X509
*
x
)
{
X509_check_purpose
(
x
,
-
1
,
-
1
);
return
x
->
skid
;
}
include/openssl/x509v3.h
浏览文件 @
d19a50c9
...
...
@@ -700,6 +700,7 @@ int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid);
uint32_t
X509_get_extension_flags
(
X509
*
x
);
uint32_t
X509_get_key_usage
(
X509
*
x
);
uint32_t
X509_get_extended_key_usage
(
X509
*
x
);
const
ASN1_OCTET_STRING
*
X509_get0_subject_key_id
(
X509
*
x
);
int
X509_PURPOSE_get_count
(
void
);
X509_PURPOSE
*
X509_PURPOSE_get0
(
int
idx
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录