Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
b31cc2d9
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看板
提交
b31cc2d9
编写于
2月 25, 2001
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Trap an invalid ASN1_ITEM construction and print out
the errant field for more ASN1 error conditions.
上级
f1965221
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
4 deletion
+16
-4
crypto/asn1/asn1.h
crypto/asn1/asn1.h
+1
-0
crypto/asn1/asn1_err.c
crypto/asn1/asn1_err.c
+1
-0
crypto/asn1/tasn_dec.c
crypto/asn1/tasn_dec.c
+14
-4
未找到文件。
crypto/asn1/asn1.h
浏览文件 @
b31cc2d9
...
...
@@ -1083,6 +1083,7 @@ int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
#define ASN1_R_ILLEGAL_CHARACTERS 124
#define ASN1_R_ILLEGAL_NULL 125
#define ASN1_R_ILLEGAL_OPTIONAL_ANY 126
#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170
#define ASN1_R_ILLEGAL_TAGGED_ANY 127
#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128
#define ASN1_R_INVALID_BMPSTRING_LENGTH 129
...
...
crypto/asn1/asn1_err.c
浏览文件 @
b31cc2d9
...
...
@@ -172,6 +172,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
{
ASN1_R_ILLEGAL_CHARACTERS
,
"illegal characters"
},
{
ASN1_R_ILLEGAL_NULL
,
"illegal null"
},
{
ASN1_R_ILLEGAL_OPTIONAL_ANY
,
"illegal optional any"
},
{
ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE
,
"illegal options on item template"
},
{
ASN1_R_ILLEGAL_TAGGED_ANY
,
"illegal tagged any"
},
{
ASN1_R_INTEGER_TOO_LARGE_FOR_LONG
,
"integer too large for long"
},
{
ASN1_R_INVALID_BMPSTRING_LENGTH
,
"invalid bmpstring length"
},
...
...
crypto/asn1/tasn_dec.c
浏览文件 @
b31cc2d9
...
...
@@ -132,8 +132,18 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, unsigned char **in, long len, const ASN1
switch
(
it
->
itype
)
{
case
ASN1_ITYPE_PRIMITIVE
:
if
(
it
->
templates
)
if
(
it
->
templates
)
{
/* tagging or OPTIONAL is currently illegal on an item template
* because the flags can't get passed down. In practice this isn't
* a problem: we include the relevant flags from the item template
* in the template itself.
*/
if
((
tag
!=
-
1
)
||
opt
)
{
ASN1err
(
ASN1_F_ASN1_ITEM_EX_D2I
,
ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE
);
goto
err
;
}
return
asn1_template_ex_d2i
(
pval
,
in
,
len
,
it
->
templates
,
opt
,
ctx
);
}
return
asn1_d2i_ex_primitive
(
pval
,
in
,
len
,
it
,
tag
,
aclass
,
opt
,
ctx
);
break
;
...
...
@@ -232,21 +242,21 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, unsigned char **in, long len, const ASN1
/* Otherwise must be an ASN1 parsing error */
errtt
=
tt
;
ASN1err
(
ASN1_F_ASN1_ITEM_EX_D2I
,
ERR_R_NESTED_ASN1_ERROR
);
return
0
;
goto
err
;
}
/* Did we fall off the end without reading anything? */
if
(
i
==
it
->
tcount
)
{
/* If OPTIONAL, this is OK */
if
(
opt
)
return
-
1
;
ASN1err
(
ASN1_F_ASN1_ITEM_EX_D2I
,
ASN1_R_NO_MATCHING_CHOICE_TYPE
);
return
0
;
goto
err
;
}
/* Otherwise we got a match, allocate structure and populate it */
if
(
!*
pval
)
{
if
(
!
ASN1_item_ex_new
(
pval
,
it
))
{
errtt
=
tt
;
ASN1err
(
ASN1_F_ASN1_ITEM_EX_D2I
,
ERR_R_NESTED_ASN1_ERROR
);
return
0
;
goto
err
;
}
}
pchptr
=
asn1_get_field_ptr
(
pval
,
tt
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录