Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
f728254a
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
8
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f728254a
编写于
9月 02, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace X509 macros with functions
Reviewed-by:
N
Tim Hudson
<
tjh@openssl.org
>
上级
fda23e2d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
35 addition
and
11 deletion
+35
-11
crypto/x509/x509_set.c
crypto/x509/x509_set.c
+25
-0
include/openssl/x509.h
include/openssl/x509.h
+10
-11
未找到文件。
crypto/x509/x509_set.c
浏览文件 @
f728254a
...
@@ -155,3 +155,28 @@ void X509_up_ref(X509 *x)
...
@@ -155,3 +155,28 @@ void X509_up_ref(X509 *x)
{
{
CRYPTO_add
(
&
x
->
references
,
1
,
CRYPTO_LOCK_X509
);
CRYPTO_add
(
&
x
->
references
,
1
,
CRYPTO_LOCK_X509
);
}
}
long
X509_get_version
(
X509
*
x
)
{
return
ASN1_INTEGER_get
(
x
->
cert_info
->
version
);
}
ASN1_TIME
*
X509_get_notBefore
(
X509
*
x
)
{
return
x
->
cert_info
->
validity
->
notBefore
;
}
ASN1_TIME
*
X509_get_notAfter
(
X509
*
x
)
{
return
x
->
cert_info
->
validity
->
notAfter
;
}
int
X509_get_signature_type
(
const
X509
*
x
)
{
return
EVP_PKEY_type
(
OBJ_obj2nid
(
x
->
sig_alg
->
algorithm
));
}
X509_PUBKEY
*
X509_get_X509_PUBKEY
(
const
X509
*
x
)
{
return
x
->
cert_info
->
key
;
}
include/openssl/x509.h
浏览文件 @
f728254a
...
@@ -445,14 +445,9 @@ extern "C" {
...
@@ -445,14 +445,9 @@ extern "C" {
# define X509_EXT_PACK_UNKNOWN 1
# define X509_EXT_PACK_UNKNOWN 1
# define X509_EXT_PACK_STRING 2
# define X509_EXT_PACK_STRING 2
# define X509_get_version(x) ASN1_INTEGER_get((x)->cert_info->version)
/* #define X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
# define X509_get_notBefore(x) ((x)->cert_info->validity->notBefore)
# define X509_get_notAfter(x) ((x)->cert_info->validity->notAfter)
# define X509_extract_key(x) X509_get_pubkey(x)
/*****/
# define X509_extract_key(x) X509_get_pubkey(x)
/*****/
# define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a)
# define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a)
# define X509_name_cmp(a,b) X509_NAME_cmp((a),(b))
# define X509_name_cmp(a,b) X509_NAME_cmp((a),(b))
# define X509_get_signature_type(x) EVP_PKEY_type(OBJ_obj2nid((x)->sig_alg->algorithm))
void
X509_CRL_set_default_method
(
const
X509_CRL_METHOD
*
meth
);
void
X509_CRL_set_default_method
(
const
X509_CRL_METHOD
*
meth
);
X509_CRL_METHOD
*
X509_CRL_METHOD_new
(
int
(
*
crl_init
)
(
X509_CRL
*
crl
),
X509_CRL_METHOD
*
X509_CRL_METHOD_new
(
int
(
*
crl_init
)
(
X509_CRL
*
crl
),
...
@@ -468,12 +463,6 @@ void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
...
@@ -468,12 +463,6 @@ void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
void
X509_CRL_set_meth_data
(
X509_CRL
*
crl
,
void
*
dat
);
void
X509_CRL_set_meth_data
(
X509_CRL
*
crl
,
void
*
dat
);
void
*
X509_CRL_get_meth_data
(
X509_CRL
*
crl
);
void
*
X509_CRL_get_meth_data
(
X509_CRL
*
crl
);
/*
* This one is only used so that a binary form can output, as in
* i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
*/
# define X509_get_X509_PUBKEY(x) ((x)->cert_info->key)
const
char
*
X509_verify_cert_error_string
(
long
n
);
const
char
*
X509_verify_cert_error_string
(
long
n
);
int
X509_verify
(
X509
*
a
,
EVP_PKEY
*
r
);
int
X509_verify
(
X509
*
a
,
EVP_PKEY
*
r
);
...
@@ -736,6 +725,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
...
@@ -736,6 +725,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
X509_ALGOR
*
algor2
,
ASN1_BIT_STRING
*
signature
,
X509_ALGOR
*
algor2
,
ASN1_BIT_STRING
*
signature
,
void
*
asn
,
EVP_MD_CTX
*
ctx
);
void
*
asn
,
EVP_MD_CTX
*
ctx
);
long
X509_get_version
(
X509
*
x
);
int
X509_set_version
(
X509
*
x
,
long
version
);
int
X509_set_version
(
X509
*
x
,
long
version
);
int
X509_set_serialNumber
(
X509
*
x
,
ASN1_INTEGER
*
serial
);
int
X509_set_serialNumber
(
X509
*
x
,
ASN1_INTEGER
*
serial
);
ASN1_INTEGER
*
X509_get_serialNumber
(
X509
*
x
);
ASN1_INTEGER
*
X509_get_serialNumber
(
X509
*
x
);
...
@@ -743,10 +733,19 @@ int X509_set_issuer_name(X509 *x, X509_NAME *name);
...
@@ -743,10 +733,19 @@ int X509_set_issuer_name(X509 *x, X509_NAME *name);
X509_NAME
*
X509_get_issuer_name
(
X509
*
a
);
X509_NAME
*
X509_get_issuer_name
(
X509
*
a
);
int
X509_set_subject_name
(
X509
*
x
,
X509_NAME
*
name
);
int
X509_set_subject_name
(
X509
*
x
,
X509_NAME
*
name
);
X509_NAME
*
X509_get_subject_name
(
X509
*
a
);
X509_NAME
*
X509_get_subject_name
(
X509
*
a
);
ASN1_TIME
*
X509_get_notBefore
(
X509
*
x
);
int
X509_set_notBefore
(
X509
*
x
,
const
ASN1_TIME
*
tm
);
int
X509_set_notBefore
(
X509
*
x
,
const
ASN1_TIME
*
tm
);
ASN1_TIME
*
X509_get_notAfter
(
X509
*
x
);
int
X509_set_notAfter
(
X509
*
x
,
const
ASN1_TIME
*
tm
);
int
X509_set_notAfter
(
X509
*
x
,
const
ASN1_TIME
*
tm
);
int
X509_set_pubkey
(
X509
*
x
,
EVP_PKEY
*
pkey
);
int
X509_set_pubkey
(
X509
*
x
,
EVP_PKEY
*
pkey
);
void
X509_up_ref
(
X509
*
x
);
void
X509_up_ref
(
X509
*
x
);
int
X509_get_signature_type
(
const
X509
*
x
);
/*
* This one is only used so that a binary form can output, as in
* i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
*/
X509_PUBKEY
*
X509_get_X509_PUBKEY
(
const
X509
*
x
);
EVP_PKEY
*
X509_get_pubkey
(
X509
*
x
);
EVP_PKEY
*
X509_get_pubkey
(
X509
*
x
);
ASN1_BIT_STRING
*
X509_get0_pubkey_bitstr
(
const
X509
*
x
);
ASN1_BIT_STRING
*
X509_get0_pubkey_bitstr
(
const
X509
*
x
);
int
X509_certificate_type
(
X509
*
x
,
EVP_PKEY
*
pubkey
/* optional */
);
int
X509_certificate_type
(
X509
*
x
,
EVP_PKEY
*
pubkey
/* optional */
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录