Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
d18ba3cc
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
9 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
d18ba3cc
编写于
5月 10, 2016
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Restore support for ENGINE format keys in apps.
RT#4207 Reviewed-by:
N
Tim Hudson
<
tjh@openssl.org
>
上级
48c16012
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
9 deletion
+22
-9
apps/dsa.c
apps/dsa.c
+1
-1
apps/ec.c
apps/ec.c
+20
-7
apps/pkey.c
apps/pkey.c
+1
-1
未找到文件。
apps/dsa.c
浏览文件 @
d18ba3cc
...
...
@@ -83,7 +83,7 @@ typedef enum OPTION_choice {
OPTIONS
dsa_options
[]
=
{
{
"help"
,
OPT_HELP
,
'-'
,
"Display this summary"
},
{
"inform"
,
OPT_INFORM
,
'
F
'
,
"Input format, DER PEM PVK"
},
{
"inform"
,
OPT_INFORM
,
'
f
'
,
"Input format, DER PEM PVK"
},
{
"outform"
,
OPT_OUTFORM
,
'F'
,
"Output format, DER PEM PVK"
},
{
"in"
,
OPT_IN
,
's'
,
"Input key"
},
{
"out"
,
OPT_OUT
,
'>'
,
"Output file"
},
...
...
apps/ec.c
浏览文件 @
d18ba3cc
...
...
@@ -92,8 +92,8 @@ typedef enum OPTION_choice {
OPTIONS
ec_options
[]
=
{
{
"help"
,
OPT_HELP
,
'-'
,
"Display this summary"
},
{
"in"
,
OPT_IN
,
'
<
'
,
"Input file"
},
{
"inform"
,
OPT_INFORM
,
'
F
'
,
"Input format - DER or PEM"
},
{
"in"
,
OPT_IN
,
'
s
'
,
"Input file"
},
{
"inform"
,
OPT_INFORM
,
'
f
'
,
"Input format - DER or PEM"
},
{
"out"
,
OPT_OUT
,
'>'
,
"Output file"
},
{
"outform"
,
OPT_OUTFORM
,
'F'
,
"Output format - DER or PEM"
},
{
"noout"
,
OPT_NOOUT
,
'-'
,
"Don't print key out"
},
...
...
@@ -118,6 +118,7 @@ OPTIONS ec_options[] = {
int
ec_main
(
int
argc
,
char
**
argv
)
{
BIO
*
in
=
NULL
,
*
out
=
NULL
;
ENGINE
*
e
;
EC_KEY
*
eckey
=
NULL
;
const
EC_GROUP
*
group
;
const
EVP_CIPHER
*
enc
=
NULL
;
...
...
@@ -143,7 +144,7 @@ int ec_main(int argc, char **argv)
ret
=
0
;
goto
end
;
case
OPT_INFORM
:
if
(
!
opt_format
(
opt_arg
(),
OPT_FMT_
PEMDER
,
&
informat
))
if
(
!
opt_format
(
opt_arg
(),
OPT_FMT_
ANY
,
&
informat
))
goto
opthelp
;
break
;
case
OPT_IN
:
...
...
@@ -178,7 +179,7 @@ int ec_main(int argc, char **argv)
passoutarg
=
opt_arg
();
break
;
case
OPT_ENGINE
:
(
void
)
setup_engine
(
opt_arg
(),
0
);
e
=
setup_engine
(
opt_arg
(),
0
);
break
;
case
OPT_CIPHER
:
if
(
!
opt_cipher
(
opt_unknown
(),
&
enc
))
...
...
@@ -217,9 +218,11 @@ int ec_main(int argc, char **argv)
goto
end
;
}
in
=
bio_open_default
(
infile
,
'r'
,
informat
);
if
(
in
==
NULL
)
goto
end
;
if
(
informat
!=
FORMAT_ENGINE
)
{
in
=
bio_open_default
(
infile
,
'r'
,
informat
);
if
(
in
==
NULL
)
goto
end
;
}
BIO_printf
(
bio_err
,
"read EC key
\n
"
);
if
(
informat
==
FORMAT_ASN1
)
{
...
...
@@ -227,6 +230,16 @@ int ec_main(int argc, char **argv)
eckey
=
d2i_EC_PUBKEY_bio
(
in
,
NULL
);
else
eckey
=
d2i_ECPrivateKey_bio
(
in
,
NULL
);
}
else
if
(
informat
==
FORMAT_ENGINE
)
{
EVP_PKEY
*
pkey
;
if
(
pubin
)
pkey
=
load_pubkey
(
infile
,
informat
,
1
,
passin
,
e
,
"Public Key"
);
else
pkey
=
load_key
(
infile
,
informat
,
1
,
passin
,
e
,
"Private Key"
);
if
(
pkey
!=
NULL
)
{
eckey
=
EVP_PKEY_get1_EC_KEY
(
pkey
);
EVP_PKEY_free
(
pkey
);
}
}
else
{
if
(
pubin
)
eckey
=
PEM_read_bio_EC_PUBKEY
(
in
,
NULL
,
NULL
,
NULL
);
...
...
apps/pkey.c
浏览文件 @
d18ba3cc
...
...
@@ -71,7 +71,7 @@ typedef enum OPTION_choice {
OPTIONS
pkey_options
[]
=
{
{
"help"
,
OPT_HELP
,
'-'
,
"Display this summary"
},
{
"inform"
,
OPT_INFORM
,
'
F
'
,
"Input format (DER or PEM)"
},
{
"inform"
,
OPT_INFORM
,
'
f
'
,
"Input format (DER or PEM)"
},
{
"outform"
,
OPT_OUTFORM
,
'F'
,
"Output format (DER or PEM)"
},
{
"passin"
,
OPT_PASSIN
,
's'
,
"Input file pass phrase source"
},
{
"passout"
,
OPT_PASSOUT
,
's'
,
"Output file pass phrase source"
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录