Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5abc8ae6
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看板
提交
5abc8ae6
编写于
6月 25, 2001
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make better use of load_cert, load_certs and load_key.
上级
6a184a60
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
16 deletion
+11
-16
apps/pkcs12.c
apps/pkcs12.c
+11
-16
未找到文件。
apps/pkcs12.c
浏览文件 @
5abc8ae6
...
...
@@ -96,7 +96,7 @@ int MAIN(int argc, char **argv)
ENGINE
*
e
=
NULL
;
char
*
infile
=
NULL
,
*
outfile
=
NULL
,
*
keyname
=
NULL
;
char
*
certfile
=
NULL
;
BIO
*
in
=
NULL
,
*
out
=
NULL
,
*
inkey
=
NULL
,
*
certsin
=
NULL
;
BIO
*
in
=
NULL
,
*
out
=
NULL
;
char
**
args
;
char
*
name
=
NULL
;
char
*
csp_name
=
NULL
;
...
...
@@ -346,6 +346,7 @@ int MAIN(int argc, char **argv)
goto
end
;
}
#if 0
if (certfile) {
if(!(certsin = BIO_new_file(certfile, "r"))) {
BIO_printf(bio_err, "Can't open certificate file %s\n", certfile);
...
...
@@ -361,6 +362,7 @@ int MAIN(int argc, char **argv)
goto end;
}
}
#endif
#ifdef CRYPTO_MDEBUG
CRYPTO_pop_info
();
...
...
@@ -414,12 +416,9 @@ int MAIN(int argc, char **argv)
CRYPTO_push_info
(
"process -export_cert"
);
CRYPTO_push_info
(
"reading private key"
);
#endif
key
=
PEM_read_bio_PrivateKey
(
inkey
?
inkey
:
in
,
NULL
,
NULL
,
passin
);
if
(
!
inkey
)
(
void
)
BIO_reset
(
in
);
else
BIO_free
(
inkey
);
key
=
load_key
(
bio_err
,
keyname
?
keyname
:
infile
,
FORMAT_PEM
,
passin
,
e
,
"private key"
);
if
(
!
key
)
{
BIO_printf
(
bio_err
,
"Error loading private key
\n
"
);
ERR_print_errors
(
bio_err
);
goto
export_end
;
}
...
...
@@ -428,12 +427,9 @@ int MAIN(int argc, char **argv)
CRYPTO_push_info
(
"reading certs from input"
);
#endif
certs
=
sk_X509_new_null
();
/* Load in all certs in input file */
if
(
!
cert_load
(
in
,
certs
))
{
BIO_printf
(
bio_err
,
"Error loading certificates from input
\n
"
);
ERR_print_errors
(
bio_err
);
if
(
!
(
certs
=
load_certs
(
bio_err
,
infile
,
FORMAT_PEM
,
NULL
,
e
,
"certificates"
)))
{
goto
export_end
;
}
...
...
@@ -463,13 +459,11 @@ int MAIN(int argc, char **argv)
bags
=
sk_PKCS12_SAFEBAG_new_null
();
/* Add any more certificates asked for */
if
(
certsin
)
{
if
(
!
cert_load
(
certsin
,
certs
))
{
BIO_printf
(
bio_err
,
"Error loading certificates from certfile
\n
"
);
ERR_print_errors
(
bio_err
);
if
(
certfile
)
{
if
(
!
(
certs
=
load_certs
(
bio_err
,
certfile
,
FORMAT_PEM
,
NULL
,
e
,
"certificates from certfile"
)))
{
goto
export_end
;
}
BIO_free
(
certsin
);
}
#ifdef CRYPTO_MDEBUG
...
...
@@ -686,6 +680,7 @@ int MAIN(int argc, char **argv)
if
(
canames
)
sk_free
(
canames
);
if
(
passin
)
OPENSSL_free
(
passin
);
if
(
passout
)
OPENSSL_free
(
passout
);
apps_shutdown
();
EXIT
(
ret
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录