Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
ba1ba5f0
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
8 个月 前同步成功
通知
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 搜索 >>
提交
ba1ba5f0
编写于
4月 15, 2006
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
If cipher list contains a match for an explicit ciphersuite only match that
one suite.
上级
51aa7bd3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
4 deletion
+25
-4
CHANGES
CHANGES
+4
-0
ssl/ssl_ciph.c
ssl/ssl_ciph.c
+21
-4
未找到文件。
CHANGES
浏览文件 @
ba1ba5f0
...
...
@@ -206,6 +206,10 @@
Changes between 0.9.8a and 0.9.8b [XX xxx XXXX]
*) When applying a cipher rule check to see if string match is an explicit
cipher suite and only match that one cipher suite if it is.
[Steve Henson]
*) Link in manifests for VC++ if needed.
[Austin Ziegler <halostatue@gmail.com>]
...
...
ssl/ssl_ciph.c
浏览文件 @
ba1ba5f0
...
...
@@ -515,7 +515,8 @@ static void ssl_cipher_collect_aliases(SSL_CIPHER **ca_list,
*
ca_curr
=
NULL
;
/* end of list */
}
static
void
ssl_cipher_apply_rule
(
unsigned
long
algorithms
,
unsigned
long
mask
,
static
void
ssl_cipher_apply_rule
(
unsigned
long
cipher_id
,
unsigned
long
algorithms
,
unsigned
long
mask
,
unsigned
long
algo_strength
,
unsigned
long
mask_strength
,
int
rule
,
int
strength_bits
,
CIPHER_ORDER
*
co_list
,
CIPHER_ORDER
**
head_p
,
CIPHER_ORDER
**
tail_p
)
...
...
@@ -541,11 +542,19 @@ static void ssl_cipher_apply_rule(unsigned long algorithms, unsigned long mask,
cp
=
curr
->
cipher
;
/* If explicit cipher suite match that one only */
if
(
cipher_id
)
{
if
(
cp
->
id
!=
cipher_id
)
continue
;
}
/*
* Selection criteria is either the number of strength_bits
* or the algorithm used.
*/
if
(
strength_bits
==
-
1
)
else
if
(
strength_bits
==
-
1
)
{
ma
=
mask
&
cp
->
algorithms
;
ma_s
=
mask_strength
&
cp
->
algo_strength
;
...
...
@@ -658,7 +667,7 @@ static int ssl_cipher_strength_sort(CIPHER_ORDER *co_list,
*/
for
(
i
=
max_strength_bits
;
i
>=
0
;
i
--
)
if
(
number_uses
[
i
]
>
0
)
ssl_cipher_apply_rule
(
0
,
0
,
0
,
0
,
CIPHER_ORD
,
i
,
ssl_cipher_apply_rule
(
0
,
0
,
0
,
0
,
0
,
CIPHER_ORD
,
i
,
co_list
,
head_p
,
tail_p
);
OPENSSL_free
(
number_uses
);
...
...
@@ -672,6 +681,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
unsigned
long
algorithms
,
mask
,
algo_strength
,
mask_strength
;
const
char
*
l
,
*
start
,
*
buf
;
int
j
,
multi
,
found
,
rule
,
retval
,
ok
,
buflen
;
unsigned
long
cipher_id
;
char
ch
;
retval
=
1
;
...
...
@@ -761,6 +771,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
* use strcmp(), because buf is not '\0' terminated.)
*/
j
=
found
=
0
;
cipher_id
=
0
;
while
(
ca_list
[
j
])
{
if
(
!
strncmp
(
buf
,
ca_list
[
j
]
->
name
,
buflen
)
&&
...
...
@@ -775,6 +786,12 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
if
(
!
found
)
break
;
/* ignore this entry */
if
(
ca_list
[
j
]
->
valid
)
{
cipher_id
=
ca_list
[
j
]
->
id
;
break
;
}
/* New algorithms:
* 1 - any old restrictions apply outside new mask
* 2 - any new restrictions apply outside old mask
...
...
@@ -818,7 +835,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
}
else
if
(
found
)
{
ssl_cipher_apply_rule
(
algorithms
,
mask
,
ssl_cipher_apply_rule
(
cipher_id
,
algorithms
,
mask
,
algo_strength
,
mask_strength
,
rule
,
-
1
,
co_list
,
head_p
,
tail_p
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录