Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
9e5dba19
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看板
提交
9e5dba19
编写于
3月 26, 2006
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify ASN.1 for point format list
Submitted by: Douglas Stebila
上级
a61114c3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
27 deletion
+5
-27
ssl/ssl_asn1.c
ssl/ssl_asn1.c
+5
-27
未找到文件。
ssl/ssl_asn1.c
浏览文件 @
9e5dba19
...
...
@@ -224,15 +224,9 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
#ifndef OPENSSL_NO_EC
if
(
in
->
tlsext_ecpointformatlist
)
{
a
.
tlsext_ecpointformatlist
.
length
=
1
+
in
->
tlsext_ecpointformatlist_length
;
a
.
tlsext_ecpointformatlist
.
length
=
in
->
tlsext_ecpointformatlist_length
;
a
.
tlsext_ecpointformatlist
.
type
=
V_ASN1_OCTET_STRING
;
if
((
a
.
tlsext_ecpointformatlist
.
data
=
OPENSSL_malloc
(
1
+
in
->
tlsext_ecpointformatlist_length
))
==
NULL
)
{
SSLerr
(
SSL_F_I2D_SSL_SESSION
,
ERR_R_MALLOC_FAILURE
);
return
(
0
);
}
*
a
.
tlsext_ecpointformatlist
.
data
=
(
unsigned
char
)
in
->
tlsext_ecpointformatlist_length
;
memcpy
(
a
.
tlsext_ecpointformatlist
.
data
+
1
,
in
->
tlsext_ecpointformatlist
,
in
->
tlsext_ecpointformatlist_length
);
a
.
tlsext_ecpointformatlist
.
data
=
(
unsigned
char
*
)
in
->
tlsext_ecpointformatlist
;
}
#endif
/* OPENSSL_NO_EC */
#endif
/* OPENSSL_NO_TLSEXT */
...
...
@@ -325,11 +319,6 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
M_ASN1_I2D_put_EXP_opt
(
&
(
a
.
psk_identity
),
i2d_ASN1_OCTET_STRING
,
9
,
v9
);
#endif
/* OPENSSL_NO_PSK */
M_ASN1_I2D_finish
();
#ifndef OPENSSL_NO_TLSEXT
#ifndef OPENSSL_NO_EC
OPENSSL_free
(
a
.
tlsext_ecpointformatlist
.
data
);
#endif
/* OPENSSL_NO_EC */
#endif
/* OPENSSL_NO_TLSEXT */
}
SSL_SESSION
*
d2i_SSL_SESSION
(
SSL_SESSION
**
a
,
const
unsigned
char
**
pp
,
...
...
@@ -516,29 +505,18 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
#ifndef OPENSSL_NO_EC
os
.
length
=
0
;
os
.
data
=
NULL
;
M_ASN1_D2I_get_EXP_opt
(
osp
,
d2i_ASN1_OCTET_STRING
,
7
);
if
(
os
.
data
)
{
if
((
ret
->
tlsext_ecpointformatlist
=
OPENSSL_malloc
(
os
.
length
-
1
))
==
NULL
)
{
SSLerr
(
SSL_F_D2I_SSL_SESSION
,
ERR_R_MALLOC_FAILURE
);
}
else
{
ret
->
tlsext_ecpointformatlist_length
=
os
.
length
-
1
;
memcpy
(
ret
->
tlsext_ecpointformatlist
,
(
unsigned
char
*
)
os
.
data
+
1
,
os
.
length
-
1
);
}
ret
->
tlsext_ecpointformatlist_length
=
os
.
length
;
memcpy
(
ret
->
tlsext_ecpointformatlist
,
os
.
data
,
ret
->
tlsext_ecpointformatlist_length
);
OPENSSL_free
(
os
.
data
);
os
.
data
=
NULL
;
os
.
length
=
0
;
}
else
{
ret
->
tlsext_ecpointformatlist
=
NULL
;
ret
->
tlsext_ecpointformatlist_length
=
0
;
}
ret
->
tlsext_ecpointformatlist
=
NULL
;
#endif
/* OPENSSL_NO_EC */
#endif
/* OPENSSL_NO_TLSEXT */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录