Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
4013f3bf
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看板
提交
4013f3bf
编写于
3月 06, 2000
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix the indentation, and avoid a compiler warning.
上级
fe10275d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
39 addition
and
38 deletion
+39
-38
ssl/ssl_ciph.c
ssl/ssl_ciph.c
+39
-38
未找到文件。
ssl/ssl_ciph.c
浏览文件 @
4013f3bf
...
...
@@ -607,7 +607,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
if
(
buflen
==
0
)
{
/*
* We hit something
,
we cannot deal with,
* We hit something we cannot deal with,
* it is no command or separator nor
* alphanumeric, so we call this an error.
*/
...
...
@@ -620,6 +620,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
if
(
rule
==
CIPHER_SPECIAL
)
{
found
=
0
;
/* unused -- avoid compiler warning */
break
;
/* special treatment */
}
...
...
@@ -633,12 +634,12 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
multi
=
0
;
/*
* Now search for the
name
in the ca_list. Be careful
* Now search for the
cipher alias
in the ca_list. Be careful
* with the strncmp, because the "buflen" limitation
* will make the rule "ADH:SOME" and the cipher
* "ADH-MY-CIPHER" look like a match for buflen=3.
* So additionally check
,
whether the cipher name found
* has the correct length. We can save a strlen() call
,
* So additionally check whether the cipher name found
* has the correct length. We can save a strlen() call
:
* just checking for the '\0' at the right place is
* sufficient, we have to strncmp() anyway.
*/
...
...
@@ -665,42 +666,42 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
if
(
!
multi
)
break
;
}
/*
* Ok, we have the rule, now apply it
*/
if
(
rule
==
CIPHER_SPECIAL
)
{
/* special command */
ok
=
0
;
if
((
buflen
==
8
)
&&
!
strncmp
(
buf
,
"STRENGTH"
,
8
))
ok
=
ssl_cipher_strength_sort
(
list
,
head_p
,
tail_p
);
else
SSLerr
(
SSL_F_SSL_CIPHER_PROCESS_RULESTR
,
SSL_R_INVALID_COMMAND
);
if
(
ok
==
0
)
retval
=
0
;
/*
* Ok, we have the rule, now apply it
* We do not support any "multi" options
* together with "@", so throw away the
* rest of the command, if any left, until
* end or ':' is found.
*/
if
(
rule
==
CIPHER_SPECIAL
)
{
/* special command */
ok
=
0
;
if
((
buflen
==
8
)
&&
!
strncmp
(
buf
,
"STRENGTH"
,
8
))
ok
=
ssl_cipher_strength_sort
(
list
,
head_p
,
tail_p
);
else
SSLerr
(
SSL_F_SSL_CIPHER_PROCESS_RULESTR
,
SSL_R_INVALID_COMMAND
);
if
(
ok
==
0
)
retval
=
0
;
/*
* We do not support any "multi" options
* together with "@", so throw away the
* rest of the command, if any left, until
* end or ':' is found.
*/
while
((
*
l
!=
'\0'
)
&&
ITEM_SEP
(
*
l
))
l
++
;
}
else
if
(
found
)
{
ssl_cipher_apply_rule
(
algorithms
,
mask
,
algo_strength
,
mask_strength
,
rule
,
-
1
,
list
,
head_p
,
tail_p
);
}
else
{
while
((
*
l
!=
'\0'
)
&&
ITEM_SEP
(
*
l
))
l
++
;
}
if
(
*
l
==
'\0'
)
break
;
/* done */
while
((
*
l
!=
'\0'
)
&&
ITEM_SEP
(
*
l
))
l
++
;
}
else
if
(
found
)
{
ssl_cipher_apply_rule
(
algorithms
,
mask
,
algo_strength
,
mask_strength
,
rule
,
-
1
,
list
,
head_p
,
tail_p
);
}
else
{
while
((
*
l
!=
'\0'
)
&&
ITEM_SEP
(
*
l
))
l
++
;
}
if
(
*
l
==
'\0'
)
break
;
/* done */
}
return
(
retval
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录