Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5382adbf
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5382adbf
编写于
6月 24, 2013
作者:
T
Trevor
提交者:
Ben Laurie
6月 28, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cosmetic touchups.
上级
ac9ce2cf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
15 deletion
+18
-15
ssl/ssl_cert.c
ssl/ssl_cert.c
+4
-3
ssl/ssl_lib.c
ssl/ssl_lib.c
+8
-6
ssl/ssl_rsa.c
ssl/ssl_rsa.c
+1
-1
ssl/t1_lib.c
ssl/t1_lib.c
+5
-5
未找到文件。
ssl/ssl_cert.c
浏览文件 @
5382adbf
...
...
@@ -350,15 +350,15 @@ CERT *ssl_cert_dup(CERT *cert)
if
(
cert
->
pkeys
[
i
].
serverinfo
!=
NULL
)
{
/* Just copy everything. */
ret
->
pkeys
[
i
].
serverinfo_length
=
cert
->
pkeys
[
i
].
serverinfo_length
;
ret
->
pkeys
[
i
].
serverinfo
=
OPENSSL_malloc
(
re
t
->
pkeys
[
i
].
serverinfo_length
);
OPENSSL_malloc
(
cer
t
->
pkeys
[
i
].
serverinfo_length
);
if
(
ret
->
pkeys
[
i
].
serverinfo
==
NULL
)
{
SSLerr
(
SSL_F_SSL_CERT_DUP
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
ret
->
pkeys
[
i
].
serverinfo_length
=
cert
->
pkeys
[
i
].
serverinfo_length
;
memcpy
(
ret
->
pkeys
[
i
].
serverinfo
,
cert
->
pkeys
[
i
].
serverinfo
,
cert
->
pkeys
[
i
].
serverinfo_length
);
...
...
@@ -488,6 +488,7 @@ void ssl_cert_clear_certs(CERT *c)
{
OPENSSL_free
(
cpk
->
serverinfo
);
cpk
->
serverinfo
=
NULL
;
cpk
->
serverinfo_length
=
0
;
}
#endif
/* Clear all flags apart from explicit sign */
...
...
ssl/ssl_lib.c
浏览文件 @
5382adbf
...
...
@@ -1702,16 +1702,17 @@ int SSL_CTX_set_custom_cli_ext(SSL_CTX *ctx, unsigned short ext_type,
custom_cli_ext_first_cb_fn
fn1
,
custom_cli_ext_second_cb_fn
fn2
,
void
*
arg
)
{
/* Check for duplicates */
size_t
i
;
custom_cli_ext_record
*
record
;
/* Check for duplicates */
for
(
i
=
0
;
i
<
ctx
->
custom_cli_ext_records_count
;
i
++
)
if
(
ext_type
==
ctx
->
custom_cli_ext_records
[
i
].
ext_type
)
return
0
;
ctx
->
custom_cli_ext_records
=
OPENSSL_realloc
(
ctx
->
custom_cli_ext_records
,
(
ctx
->
custom_cli_ext_records_count
+
1
)
*
sizeof
(
custom_cli_ext_record
));
(
ctx
->
custom_cli_ext_records_count
+
1
)
*
sizeof
(
custom_cli_ext_record
));
if
(
!
ctx
->
custom_cli_ext_records
)
{
ctx
->
custom_cli_ext_records_count
=
0
;
return
0
;
...
...
@@ -1726,19 +1727,20 @@ int SSL_CTX_set_custom_cli_ext(SSL_CTX *ctx, unsigned short ext_type,
}
int
SSL_CTX_set_custom_srv_ext
(
SSL_CTX
*
ctx
,
unsigned
short
ext_type
,
custom_srv_ext_first_cb_fn
fn1
,
custom_srv_ext_second_cb_fn
fn2
,
void
*
arg
)
custom_srv_ext_first_cb_fn
fn1
,
custom_srv_ext_second_cb_fn
fn2
,
void
*
arg
)
{
/* Check for duplicates */
size_t
i
;
custom_srv_ext_record
*
record
;
/* Check for duplicates */
for
(
i
=
0
;
i
<
ctx
->
custom_srv_ext_records_count
;
i
++
)
if
(
ext_type
==
ctx
->
custom_srv_ext_records
[
i
].
ext_type
)
return
0
;
ctx
->
custom_srv_ext_records
=
OPENSSL_realloc
(
ctx
->
custom_srv_ext_records
,
(
ctx
->
custom_srv_ext_records_count
+
1
)
*
sizeof
(
custom_srv_ext_record
));
(
ctx
->
custom_srv_ext_records_count
+
1
)
*
sizeof
(
custom_srv_ext_record
));
if
(
!
ctx
->
custom_srv_ext_records
)
{
ctx
->
custom_srv_ext_records_count
=
0
;
return
0
;
...
...
ssl/ssl_rsa.c
浏览文件 @
5382adbf
...
...
@@ -1096,7 +1096,7 @@ int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
return
0
;
}
ctx
->
cert
->
key
->
serverinfo
=
OPENSSL_realloc
(
ctx
->
cert
->
key
->
serverinfo
,
serverinfo_length
);
serverinfo_length
);
if
(
ctx
->
cert
->
key
->
serverinfo
==
NULL
)
{
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO
,
ERR_R_MALLOC_FAILURE
);
...
...
ssl/t1_lib.c
浏览文件 @
5382adbf
...
...
@@ -2364,19 +2364,19 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char
record
=
&
s
->
ctx
->
custom_srv_ext_records
[
i
];
if
(
type
==
record
->
ext_type
)
{
/* Error on duplicate TLS Extensions */
size_t
j
;
/* Error on duplicate TLS Extensions */
for
(
j
=
0
;
j
<
s
->
s3
->
tlsext_custom_types_count
;
j
++
)
{
if
(
s
->
s3
->
tlsext_custom_types
[
j
]
==
type
)
if
(
type
==
s
->
s3
->
tlsext_custom_types
[
j
]
)
{
*
al
=
TLS1_AD_DECODE_ERROR
;
return
0
;
}
}
/*
Callback */
/*
NULL callback still notes the extension */
if
(
record
->
fn1
&&
!
record
->
fn1
(
s
,
type
,
data
,
size
,
al
,
record
->
arg
))
return
0
;
...
...
@@ -2384,7 +2384,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char
s
->
s3
->
tlsext_custom_types_count
++
;
s
->
s3
->
tlsext_custom_types
=
OPENSSL_realloc
(
s
->
s3
->
tlsext_custom_types
,
s
->
s3
->
tlsext_custom_types_count
*
2
);
s
->
s3
->
tlsext_custom_types_count
*
2
);
if
(
s
->
s3
->
tlsext_custom_types
==
NULL
)
{
s
->
s3
->
tlsext_custom_types
=
0
;
...
...
@@ -2392,7 +2392,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char
return
0
;
}
s
->
s3
->
tlsext_custom_types
[
s
->
s3
->
tlsext_custom_types_count
-
1
]
=
type
;
s
->
s3
->
tlsext_custom_types_count
-
1
]
=
type
;
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录