Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
1480b8a9
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看板
提交
1480b8a9
编写于
5月 10, 2016
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add -srp option to ciphers command.
RT#4224 Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
bfcdd4d0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
6 deletion
+31
-6
apps/ciphers.c
apps/ciphers.c
+21
-0
doc/apps/ciphers.pod
doc/apps/ciphers.pod
+10
-6
未找到文件。
apps/ciphers.c
浏览文件 @
1480b8a9
...
...
@@ -70,6 +70,7 @@ typedef enum OPTION_choice {
OPT_TLS1_1
,
OPT_TLS1_2
,
OPT_PSK
,
OPT_SRP
,
OPT_V
,
OPT_UPPER_V
,
OPT_S
}
OPTION_CHOICE
;
...
...
@@ -95,6 +96,9 @@ OPTIONS ciphers_options[] = {
#endif
#ifndef OPENSSL_NO_PSK
{
"psk"
,
OPT_PSK
,
'-'
,
"include ciphersuites requiring PSK"
},
#endif
#ifndef OPENSSL_NO_SRP
{
"srp"
,
OPT_SRP
,
'-'
,
"include ciphersuites requiring SRP"
},
#endif
{
NULL
}
};
...
...
@@ -108,6 +112,12 @@ static unsigned int dummy_psk(SSL *ssl, const char *hint, char *identity,
return
0
;
}
#endif
#ifndef OPENSSL_NO_SRP
static
char
*
dummy_srp
(
SSL
*
ssl
,
void
*
arg
)
{
return
""
;
}
#endif
int
ciphers_main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -121,6 +131,9 @@ int ciphers_main(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_PSK
int
psk
=
0
;
#endif
#ifndef OPENSSL_NO_SRP
int
srp
=
0
;
#endif
const
char
*
p
;
char
*
ciphers
=
NULL
,
*
prog
;
...
...
@@ -173,6 +186,10 @@ int ciphers_main(int argc, char **argv)
case
OPT_PSK
:
#ifndef OPENSSL_NO_PSK
psk
=
1
;
#endif
case
OPT_SRP
:
#ifndef OPENSSL_NO_SRP
srp
=
1
;
#endif
break
;
}
...
...
@@ -196,6 +213,10 @@ int ciphers_main(int argc, char **argv)
#ifndef OPENSSL_NO_PSK
if
(
psk
)
SSL_CTX_set_psk_client_callback
(
ctx
,
dummy_psk
);
#endif
#ifndef OPENSSL_NO_SRP
if
(
srp
)
SSL_CTX_set_srp_client_pwd_callback
(
ctx
,
dummy_srp
);
#endif
if
(
ciphers
!=
NULL
)
{
if
(
!
SSL_CTX_set_cipher_list
(
ctx
,
ciphers
))
{
...
...
doc/apps/ciphers.pod
浏览文件 @
1480b8a9
...
...
@@ -17,6 +17,7 @@ B<openssl> B<ciphers>
[B<-tls1_2>]
[B<-s>]
[B<-psk>]
[B<-srp>]
[B<-stdname>]
[B<cipherlist>]
...
...
@@ -37,13 +38,12 @@ Print a usage message.
=item B<-s>
Only list supported ciphers: those consistent with the security level, and
minimum and maximum protocol version.
This is closer to the actual cipher list an application will support.
minimum and maximum protocol version. This is closer to the actual cipher list
an application will support.
PSK and SRP ciphers are not enabled by default: they require B<-psk> or B<-srp>
to enable them.
This program does not set up support for SRP and so SRP based ciphers will
always be excluded when using this option.
PSK ciphers are not enabled by default and it requires the B<-psk> to enable
them.
It also does not change the default list of supported signature algorithms.
On a server the list of supported ciphers might also exclude other ciphers
...
...
@@ -56,6 +56,10 @@ listed.
When combined with B<-s> includes cipher suites which require PSK.
=item B<-srp>
When combined with B<-s> includes cipher suites which require SRP.
=item B<-v>
Verbose output: For each ciphersuite, list details as provided by
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录