Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
16754806
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看板
提交
16754806
编写于
1月 27, 2016
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add option to exclude public key from EC keys
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
f6de4eb7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
1 deletion
+15
-1
apps/ec.c
apps/ec.c
+10
-1
doc/apps/ec.pod
doc/apps/ec.pod
+5
-0
未找到文件。
apps/ec.c
浏览文件 @
16754806
...
@@ -83,7 +83,8 @@ typedef enum OPTION_choice {
...
@@ -83,7 +83,8 @@ typedef enum OPTION_choice {
OPT_ERR
=
-
1
,
OPT_EOF
=
0
,
OPT_HELP
,
OPT_ERR
=
-
1
,
OPT_EOF
=
0
,
OPT_HELP
,
OPT_INFORM
,
OPT_OUTFORM
,
OPT_ENGINE
,
OPT_IN
,
OPT_OUT
,
OPT_INFORM
,
OPT_OUTFORM
,
OPT_ENGINE
,
OPT_IN
,
OPT_OUT
,
OPT_NOOUT
,
OPT_TEXT
,
OPT_PARAM_OUT
,
OPT_PUBIN
,
OPT_PUBOUT
,
OPT_NOOUT
,
OPT_TEXT
,
OPT_PARAM_OUT
,
OPT_PUBIN
,
OPT_PUBOUT
,
OPT_PASSIN
,
OPT_PASSOUT
,
OPT_PARAM_ENC
,
OPT_CONV_FORM
,
OPT_CIPHER
OPT_PASSIN
,
OPT_PASSOUT
,
OPT_PARAM_ENC
,
OPT_CONV_FORM
,
OPT_CIPHER
,
OPT_NO_PUBLIC
}
OPTION_CHOICE
;
}
OPTION_CHOICE
;
OPTIONS
ec_options
[]
=
{
OPTIONS
ec_options
[]
=
{
...
@@ -97,6 +98,7 @@ OPTIONS ec_options[] = {
...
@@ -97,6 +98,7 @@ OPTIONS ec_options[] = {
{
"param_out"
,
OPT_PARAM_OUT
,
'-'
,
"Print the elliptic curve parameters"
},
{
"param_out"
,
OPT_PARAM_OUT
,
'-'
,
"Print the elliptic curve parameters"
},
{
"pubin"
,
OPT_PUBIN
,
'-'
},
{
"pubin"
,
OPT_PUBIN
,
'-'
},
{
"pubout"
,
OPT_PUBOUT
,
'-'
},
{
"pubout"
,
OPT_PUBOUT
,
'-'
},
{
"no_public"
,
OPT_NO_PUBLIC
,
'-'
,
"exclude public key from private key"
},
{
"passin"
,
OPT_PASSIN
,
's'
,
"Input file pass phrase source"
},
{
"passin"
,
OPT_PASSIN
,
's'
,
"Input file pass phrase source"
},
{
"passout"
,
OPT_PASSOUT
,
's'
,
"Output file pass phrase source"
},
{
"passout"
,
OPT_PASSOUT
,
's'
,
"Output file pass phrase source"
},
{
"param_enc"
,
OPT_PARAM_ENC
,
's'
,
{
"param_enc"
,
OPT_PARAM_ENC
,
's'
,
...
@@ -122,6 +124,7 @@ int ec_main(int argc, char **argv)
...
@@ -122,6 +124,7 @@ int ec_main(int argc, char **argv)
int
asn1_flag
=
OPENSSL_EC_NAMED_CURVE
,
new_form
=
0
,
new_asn1_flag
=
0
;
int
asn1_flag
=
OPENSSL_EC_NAMED_CURVE
,
new_form
=
0
,
new_asn1_flag
=
0
;
int
informat
=
FORMAT_PEM
,
outformat
=
FORMAT_PEM
,
text
=
0
,
noout
=
0
;
int
informat
=
FORMAT_PEM
,
outformat
=
FORMAT_PEM
,
text
=
0
,
noout
=
0
;
int
pubin
=
0
,
pubout
=
0
,
param_out
=
0
,
i
,
ret
=
1
,
private
=
0
;
int
pubin
=
0
,
pubout
=
0
,
param_out
=
0
,
i
,
ret
=
1
,
private
=
0
;
int
no_public
=
0
;
prog
=
opt_init
(
argc
,
argv
,
ec_options
);
prog
=
opt_init
(
argc
,
argv
,
ec_options
);
while
((
o
=
opt_next
())
!=
OPT_EOF
)
{
while
((
o
=
opt_next
())
!=
OPT_EOF
)
{
...
@@ -189,6 +192,9 @@ int ec_main(int argc, char **argv)
...
@@ -189,6 +192,9 @@ int ec_main(int argc, char **argv)
new_asn1_flag
=
1
;
new_asn1_flag
=
1
;
asn1_flag
=
i
;
asn1_flag
=
i
;
break
;
break
;
case
OPT_NO_PUBLIC
:
no_public
=
1
;
break
;
}
}
}
}
argc
=
opt_num_rest
();
argc
=
opt_num_rest
();
...
@@ -236,6 +242,9 @@ int ec_main(int argc, char **argv)
...
@@ -236,6 +242,9 @@ int ec_main(int argc, char **argv)
if
(
new_asn1_flag
)
if
(
new_asn1_flag
)
EC_KEY_set_asn1_flag
(
eckey
,
asn1_flag
);
EC_KEY_set_asn1_flag
(
eckey
,
asn1_flag
);
if
(
no_public
)
EC_KEY_set_enc_flags
(
eckey
,
EC_PKEY_NO_PUBKEY
);
if
(
text
)
{
if
(
text
)
{
assert
(
pubin
||
private
);
assert
(
pubin
||
private
);
if
(
!
EC_KEY_print
(
out
,
eckey
,
0
))
{
if
(
!
EC_KEY_print
(
out
,
eckey
,
0
))
{
...
...
doc/apps/ec.pod
浏览文件 @
16754806
...
@@ -23,6 +23,7 @@ B<openssl> B<ec>
...
@@ -23,6 +23,7 @@ B<openssl> B<ec>
[B<-pubout>]
[B<-pubout>]
[B<-conv_form arg>]
[B<-conv_form arg>]
[B<-param_enc arg>]
[B<-param_enc arg>]
[B<-no_public>]
[B<-engine id>]
[B<-engine id>]
=head1 DESCRIPTION
=head1 DESCRIPTION
...
@@ -128,6 +129,10 @@ EC parameters structures). The default value is B<named_curve>.
...
@@ -128,6 +129,10 @@ EC parameters structures). The default value is B<named_curve>.
B<Note> the B<implicitlyCA> alternative ,as specified in RFC 3279,
B<Note> the B<implicitlyCA> alternative ,as specified in RFC 3279,
is currently not implemented in OpenSSL.
is currently not implemented in OpenSSL.
=item B<-no_public>
This option omits the public key components from the private key output.
=item B<-engine id>
=item B<-engine id>
specifying an engine (by its unique B<id> string) will cause B<ec>
specifying an engine (by its unique B<id> string) will cause B<ec>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录