Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
a469a677
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看板
提交
a469a677
编写于
3月 30, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove old ASN.1 functions.
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
1880790e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
99 deletion
+0
-99
crypto/asn1/asn1_lib.c
crypto/asn1/asn1_lib.c
+0
-61
include/openssl/asn1.h
include/openssl/asn1.h
+0
-38
未找到文件。
crypto/asn1/asn1_lib.c
浏览文件 @
a469a677
...
...
@@ -60,7 +60,6 @@
#include <limits.h>
#include "cryptlib.h"
#include <openssl/asn1.h>
#include <openssl/asn1_mac.h>
static
int
asn1_get_length
(
const
unsigned
char
**
pp
,
int
*
inf
,
long
*
rl
,
int
max
);
...
...
@@ -279,57 +278,6 @@ int ASN1_object_size(int constructed, int length, int tag)
return
(
ret
);
}
static
int
_asn1_Finish
(
ASN1_const_CTX
*
c
)
{
if
((
c
->
inf
==
(
1
|
V_ASN1_CONSTRUCTED
))
&&
(
!
c
->
eos
))
{
if
(
!
ASN1_const_check_infinite_end
(
&
c
->
p
,
c
->
slen
))
{
c
->
error
=
ERR_R_MISSING_ASN1_EOS
;
return
(
0
);
}
}
if
(((
c
->
slen
!=
0
)
&&
!
(
c
->
inf
&
1
))
||
((
c
->
slen
<
0
)
&&
(
c
->
inf
&
1
)))
{
c
->
error
=
ERR_R_ASN1_LENGTH_MISMATCH
;
return
(
0
);
}
return
(
1
);
}
int
asn1_Finish
(
ASN1_CTX
*
c
)
{
return
_asn1_Finish
((
ASN1_const_CTX
*
)
c
);
}
int
asn1_const_Finish
(
ASN1_const_CTX
*
c
)
{
return
_asn1_Finish
(
c
);
}
int
asn1_GetSequence
(
ASN1_const_CTX
*
c
,
long
*
length
)
{
const
unsigned
char
*
q
;
q
=
c
->
p
;
c
->
inf
=
ASN1_get_object
(
&
(
c
->
p
),
&
(
c
->
slen
),
&
(
c
->
tag
),
&
(
c
->
xclass
),
*
length
);
if
(
c
->
inf
&
0x80
)
{
c
->
error
=
ERR_R_BAD_GET_ASN1_OBJECT_CALL
;
return
(
0
);
}
if
(
c
->
tag
!=
V_ASN1_SEQUENCE
)
{
c
->
error
=
ERR_R_EXPECTING_AN_ASN1_SEQUENCE
;
return
(
0
);
}
(
*
length
)
-=
(
c
->
p
-
q
);
if
(
c
->
max
&&
(
*
length
<
0
))
{
c
->
error
=
ERR_R_ASN1_LENGTH_MISMATCH
;
return
(
0
);
}
if
(
c
->
inf
==
(
1
|
V_ASN1_CONSTRUCTED
))
c
->
slen
=
*
length
+
*
(
c
->
pp
)
-
c
->
p
;
c
->
eos
=
0
;
return
(
1
);
}
int
ASN1_STRING_copy
(
ASN1_STRING
*
dst
,
const
ASN1_STRING
*
str
)
{
if
(
str
==
NULL
)
...
...
@@ -451,15 +399,6 @@ int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b)
return
(
i
);
}
void
asn1_add_error
(
const
unsigned
char
*
address
,
int
offset
)
{
char
buf1
[
DECIMAL_SIZE
(
address
)
+
1
],
buf2
[
DECIMAL_SIZE
(
offset
)
+
1
];
BIO_snprintf
(
buf1
,
sizeof
buf1
,
"%lu"
,
(
unsigned
long
)
address
);
BIO_snprintf
(
buf2
,
sizeof
buf2
,
"%d"
,
offset
);
ERR_add_error_data
(
4
,
"address="
,
buf1
,
" offset="
,
buf2
);
}
int
ASN1_STRING_length
(
const
ASN1_STRING
*
x
)
{
return
x
->
length
;
...
...
include/openssl/asn1.h
浏览文件 @
a469a677
...
...
@@ -159,41 +159,6 @@ extern "C" {
struct
X509_algor_st
;
DECLARE_STACK_OF
(
X509_ALGOR
)
/*
* We MUST make sure that, except for constness, asn1_ctx_st and
* asn1_const_ctx are exactly the same. Fortunately, as soon as the old ASN1
* parsing macros are gone, we can throw this away as well...
*/
typedef
struct
asn1_ctx_st
{
unsigned
char
*
p
;
/* work char pointer */
int
eos
;
/* end of sequence read for indefinite
* encoding */
int
error
;
/* error code to use when returning an error */
int
inf
;
/* constructed if 0x20, indefinite is 0x21 */
int
tag
;
/* tag from last 'get object' */
int
xclass
;
/* class from last 'get object' */
long
slen
;
/* length of last 'get object' */
unsigned
char
*
max
;
/* largest value of p allowed */
unsigned
char
*
q
;
/* temporary variable */
unsigned
char
**
pp
;
/* variable */
int
line
;
/* used in error processing */
}
ASN1_CTX
;
typedef
struct
asn1_const_ctx_st
{
const
unsigned
char
*
p
;
/* work char pointer */
int
eos
;
/* end of sequence read for indefinite
* encoding */
int
error
;
/* error code to use when returning an error */
int
inf
;
/* constructed if 0x20, indefinite is 0x21 */
int
tag
;
/* tag from last 'get object' */
int
xclass
;
/* class from last 'get object' */
long
slen
;
/* length of last 'get object' */
const
unsigned
char
*
max
;
/* largest value of p allowed */
const
unsigned
char
*
q
;
/* temporary variable */
const
unsigned
char
**
pp
;
/* variable */
int
line
;
/* used in error processing */
}
ASN1_const_CTX
;
# define ASN1_STRING_FLAG_BITS_LEFT 0x08
/* Set if 0x07 has bits left value */
/*
* This indicates that the ASN1_STRING is not a real value but just a place
...
...
@@ -727,9 +692,6 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
int
ASN1_PRINTABLE_type
(
const
unsigned
char
*
s
,
int
max
);
unsigned
long
ASN1_tag2bit
(
int
tag
);
/* PARSING */
int
asn1_Finish
(
ASN1_CTX
*
c
);
int
asn1_const_Finish
(
ASN1_const_CTX
*
c
);
/* SPECIALS */
int
ASN1_get_object
(
const
unsigned
char
**
pp
,
long
*
plength
,
int
*
ptag
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录