Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
56a3fec1
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看板
提交
56a3fec1
编写于
10月 11, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add EX_DATA support to X509.
Fix a bug in the X509_get_d2i() functions which didn't check if crit was NULL.
上级
4654ef98
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
2 deletion
+33
-2
CHANGES
CHANGES
+4
-0
crypto/asn1/x_x509.c
crypto/asn1/x_x509.c
+23
-1
crypto/x509/x509.h
crypto/x509/x509.h
+5
-0
crypto/x509v3/v3_lib.c
crypto/x509v3/v3_lib.c
+1
-1
未找到文件。
CHANGES
浏览文件 @
56a3fec1
...
...
@@ -4,6 +4,10 @@
Changes between 0.9.4 and 0.9.5 [xx XXX 1999]
*) Add a CRYPTO_EX_DATA to X509 certificate structure and associated
functions.
[Steve Henson]
*) New X509V3_{X509,CRL,REVOKED}_get_d2i() functions. These will search
for, obtain and decode and extension and obtain its critical flag.
This allows all the necessary extension code to be handled in a
...
...
crypto/asn1/x_x509.c
浏览文件 @
56a3fec1
...
...
@@ -62,6 +62,9 @@
#include <openssl/asn1_mac.h>
#include <openssl/x509.h>
static
int
x509_meth_num
=
0
;
static
STACK
*
x509_meth
=
NULL
;
static
ASN1_METHOD
meth
=
{
(
int
(
*
)())
i2d_X509
,
(
char
*
(
*
)())
d2i_X509
,
...
...
@@ -117,6 +120,7 @@ X509 *X509_new(void)
M_ASN1_New
(
ret
->
cert_info
,
X509_CINF_new
);
M_ASN1_New
(
ret
->
sig_alg
,
X509_ALGOR_new
);
M_ASN1_New
(
ret
->
signature
,
ASN1_BIT_STRING_new
);
CRYPTO_new_ex_data
(
x509_meth
,
(
char
*
)
ret
,
&
ret
->
ex_data
);
return
(
ret
);
M_ASN1_New_Error
(
ASN1_F_X509_NEW
);
}
...
...
@@ -140,7 +144,7 @@ void X509_free(X509 *a)
}
#endif
/* CRYPTO_free_ex_data(bio_meth,(char *)a,&a->ex_data); */
CRYPTO_free_ex_data
(
x509_meth
,(
char
*
)
a
,
&
a
->
ex_data
);
X509_CINF_free
(
a
->
cert_info
);
X509_ALGOR_free
(
a
->
sig_alg
);
ASN1_BIT_STRING_free
(
a
->
signature
);
...
...
@@ -149,3 +153,21 @@ void X509_free(X509 *a)
Free
((
char
*
)
a
);
}
int
X509_get_ex_new_index
(
long
argl
,
char
*
argp
,
int
(
*
new_func
)(),
int
(
*
dup_func
)(),
void
(
*
free_func
)())
{
x509_meth_num
++
;
return
(
CRYPTO_get_ex_new_index
(
x509_meth_num
-
1
,
&
x509_meth
,
argl
,
argp
,
new_func
,
dup_func
,
free_func
));
}
int
X509_set_ex_data
(
X509
*
r
,
int
idx
,
char
*
arg
)
{
return
(
CRYPTO_set_ex_data
(
&
r
->
ex_data
,
idx
,
arg
));
}
char
*
X509_get_ex_data
(
X509
*
r
,
int
idx
)
{
return
(
CRYPTO_get_ex_data
(
&
r
->
ex_data
,
idx
));
}
crypto/x509/x509.h
浏览文件 @
56a3fec1
...
...
@@ -238,6 +238,7 @@ typedef struct x509_st
int
valid
;
int
references
;
char
*
name
;
CRYPTO_EX_DATA
ex_data
;
}
X509
;
DECLARE_STACK_OF
(
X509
)
...
...
@@ -724,6 +725,10 @@ X509 * X509_new(void);
void
X509_free
(
X509
*
a
);
int
i2d_X509
(
X509
*
a
,
unsigned
char
**
pp
);
X509
*
d2i_X509
(
X509
**
a
,
unsigned
char
**
pp
,
long
length
);
int
X509_get_ex_new_index
(
long
argl
,
char
*
argp
,
int
(
*
new_func
)(),
int
(
*
dup_func
)(),
void
(
*
free_func
)());
int
X509_set_ex_data
(
X509
*
r
,
int
idx
,
char
*
arg
);
char
*
X509_get_ex_data
(
X509
*
r
,
int
idx
);
X509_REVOKED
*
X509_REVOKED_new
(
void
);
void
X509_REVOKED_free
(
X509_REVOKED
*
a
);
...
...
crypto/x509v3/v3_lib.c
浏览文件 @
56a3fec1
...
...
@@ -219,7 +219,7 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx)
}
if
(
found_ex
)
{
/* Found it */
*
crit
=
found_ex
->
critical
;
if
(
crit
)
*
crit
=
found_ex
->
critical
;
return
X509V3_EXT_d2i
(
found_ex
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录