Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
e5e932d2
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e5e932d2
编写于
5月 30, 1999
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Another safe stack.
上级
ee8ba0b2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
15 deletion
+17
-15
apps/nseq.c
apps/nseq.c
+5
-5
crypto/asn1/nsseq.c
crypto/asn1/nsseq.c
+11
-9
crypto/x509/x509.h
crypto/x509/x509.h
+1
-1
未找到文件。
apps/nseq.c
浏览文件 @
e5e932d2
...
...
@@ -123,11 +123,11 @@ int MAIN(int argc, char **argv)
if
(
toseq
)
{
seq
=
NETSCAPE_CERT_SEQUENCE_new
();
seq
->
certs
=
sk_new
(
NULL
);
seq
->
certs
=
sk_
X509_
new
(
NULL
);
while
((
x509
=
PEM_read_bio_X509
(
in
,
NULL
,
NULL
)))
sk_push
(
seq
->
certs
,
(
char
*
)
x509
);
sk_X509_push
(
seq
->
certs
,
x509
);
if
(
!
sk_num
(
seq
->
certs
))
if
(
!
sk_
X509_
num
(
seq
->
certs
))
{
BIO_printf
(
bio_err
,
"Error reading certs file %s
\n
"
,
infile
);
ERR_print_errors
(
bio_err
);
...
...
@@ -144,8 +144,8 @@ int MAIN(int argc, char **argv)
goto
end
;
}
for
(
i
=
0
;
i
<
sk_num
(
seq
->
certs
);
i
++
)
{
x509
=
(
X509
*
)
sk
_value
(
seq
->
certs
,
i
);
for
(
i
=
0
;
i
<
sk_
X509_
num
(
seq
->
certs
);
i
++
)
{
x509
=
sk_X509
_value
(
seq
->
certs
,
i
);
dump_cert_text
(
out
,
x509
);
PEM_write_bio_X509
(
out
,
x509
);
}
...
...
crypto/asn1/nsseq.c
浏览文件 @
e5e932d2
...
...
@@ -70,14 +70,14 @@ int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **pp)
int
v
=
0
;
M_ASN1_I2D_vars
(
a
);
M_ASN1_I2D_len
(
a
->
type
,
i2d_ASN1_OBJECT
);
M_ASN1_I2D_len_EXP_SEQUENCE_opt
(
a
->
certs
,
i2d_X509
,
0
,
V_ASN1_SEQUENCE
,
v
);
M_ASN1_I2D_len_EXP_SEQUENCE_opt
_type
(
X509
,
a
->
certs
,
i2d_X509
,
0
,
V_ASN1_SEQUENCE
,
v
);
M_ASN1_I2D_seq_total
();
M_ASN1_I2D_put
(
a
->
type
,
i2d_ASN1_OBJECT
);
M_ASN1_I2D_put_EXP_SEQUENCE_opt
(
a
->
certs
,
i2d_X509
,
0
,
V_ASN1_SEQUENCE
,
v
);
M_ASN1_I2D_put_EXP_SEQUENCE_opt
_type
(
X509
,
a
->
certs
,
i2d_X509
,
0
,
V_ASN1_SEQUENCE
,
v
);
M_ASN1_I2D_finish
();
}
...
...
@@ -102,15 +102,17 @@ NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a,
M_ASN1_D2I_Init
();
M_ASN1_D2I_start_sequence
();
M_ASN1_D2I_get
(
ret
->
type
,
d2i_ASN1_OBJECT
);
M_ASN1_D2I_get_EXP_set_opt
(
ret
->
certs
,
d2i_X509
,
X509_free
,
0
,
V_ASN1_SEQUENCE
);
M_ASN1_D2I_Finish
(
a
,
NETSCAPE_CERT_SEQUENCE_free
,
ASN1_F_D2I_NETSCAPE_CERT_SEQUENCE
);
M_ASN1_D2I_get_EXP_set_opt_type
(
X509
,
ret
->
certs
,
d2i_X509
,
X509_free
,
0
,
V_ASN1_SEQUENCE
);
M_ASN1_D2I_Finish
(
a
,
NETSCAPE_CERT_SEQUENCE_free
,
ASN1_F_D2I_NETSCAPE_CERT_SEQUENCE
);
}
void
NETSCAPE_CERT_SEQUENCE_free
(
NETSCAPE_CERT_SEQUENCE
*
a
)
{
if
(
a
==
NULL
)
return
;
ASN1_OBJECT_free
(
a
->
type
);
if
(
a
->
certs
)
sk_pop_free
(
a
->
certs
,
X509_free
);
Free
((
char
*
)
a
);
if
(
a
->
certs
)
sk_X509_pop_free
(
a
->
certs
,
X509_free
);
Free
(
a
);
}
crypto/x509/x509.h
浏览文件 @
e5e932d2
...
...
@@ -331,7 +331,7 @@ typedef struct Netscape_spki_st
typedef
struct
Netscape_certificate_sequence
{
ASN1_OBJECT
*
type
;
STACK
/* X509 */
*
certs
;
STACK
_OF
(
X509
)
*
certs
;
}
NETSCAPE_CERT_SEQUENCE
;
#ifndef HEADER_BN_H
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录