Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
70f34a58
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,发现更多精彩内容 >>
提交
70f34a58
编写于
4月 05, 2005
作者:
N
Nils Larsch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
some const fixes and cleanup
上级
c2e40d0f
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
38 addition
and
38 deletion
+38
-38
crypto/asn1/asn1_par.c
crypto/asn1/asn1_par.c
+5
-4
crypto/bio/b_print.c
crypto/bio/b_print.c
+1
-1
crypto/err/err.c
crypto/err/err.c
+7
-7
crypto/evp/evp_pbe.c
crypto/evp/evp_pbe.c
+2
-1
crypto/evp/evp_pkey.c
crypto/evp/evp_pkey.c
+0
-2
crypto/evp/names.c
crypto/evp/names.c
+4
-4
crypto/lhash/lhash.c
crypto/lhash/lhash.c
+7
-7
crypto/objects/o_names.c
crypto/objects/o_names.c
+3
-3
crypto/objects/obj_dat.c
crypto/objects/obj_dat.c
+9
-9
未找到文件。
crypto/asn1/asn1_par.c
浏览文件 @
70f34a58
...
...
@@ -215,7 +215,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
{
if
(
BIO_write
(
bp
,
":"
,
1
)
<=
0
)
goto
end
;
if
((
len
>
0
)
&&
BIO_write
(
bp
,(
char
*
)
p
,(
int
)
len
)
BIO_write
(
bp
,(
c
onst
c
har
*
)
p
,(
int
)
len
)
!=
(
int
)
len
)
goto
end
;
}
...
...
@@ -278,7 +278,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
{
if
(
BIO_write
(
bp
,
":"
,
1
)
<=
0
)
goto
end
;
if
(
BIO_write
(
bp
,(
char
*
)
opp
,
if
(
BIO_write
(
bp
,(
c
onst
c
har
*
)
opp
,
os
->
length
)
<=
0
)
goto
end
;
}
...
...
@@ -303,7 +303,8 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
if
(
BIO_write
(
bp
,
"
\n
"
,
1
)
<=
0
)
goto
end
;
}
if
(
BIO_dump_indent
(
bp
,(
char
*
)
opp
,
if
(
BIO_dump_indent
(
bp
,
(
const
char
*
)
opp
,
((
dump
==
-
1
||
dump
>
os
->
length
)
?
os
->
length
:
dump
),
dump_indent
)
<=
0
)
...
...
@@ -388,7 +389,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
if
(
BIO_write
(
bp
,
"
\n
"
,
1
)
<=
0
)
goto
end
;
}
if
(
BIO_dump_indent
(
bp
,(
char
*
)
p
,
if
(
BIO_dump_indent
(
bp
,(
c
onst
c
har
*
)
p
,
((
dump
==
-
1
||
dump
>
len
)
?
len
:
dump
),
dump_indent
)
<=
0
)
goto
end
;
...
...
crypto/bio/b_print.c
浏览文件 @
70f34a58
...
...
@@ -482,7 +482,7 @@ fmtint(
int
flags
)
{
int
signvalue
=
0
;
char
*
prefix
=
""
;
c
onst
c
har
*
prefix
=
""
;
unsigned
LLONG
uvalue
;
char
convert
[
DECIMAL_SIZE
(
value
)
+
3
];
int
place
=
0
;
...
...
crypto/err/err.c
浏览文件 @
70f34a58
...
...
@@ -943,7 +943,7 @@ static unsigned long err_hash(const void *a_void)
{
unsigned
long
ret
,
l
;
l
=
((
ERR_STRING_DATA
*
)
a_void
)
->
error
;
l
=
((
const
ERR_STRING_DATA
*
)
a_void
)
->
error
;
ret
=
l
^
ERR_GET_LIB
(
l
)
^
ERR_GET_FUNC
(
l
);
return
(
ret
^
ret
%
19
*
13
);
}
...
...
@@ -951,21 +951,21 @@ static unsigned long err_hash(const void *a_void)
/* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b) */
static
int
err_cmp
(
const
void
*
a_void
,
const
void
*
b_void
)
{
return
((
int
)(((
ERR_STRING_DATA
*
)
a_void
)
->
error
-
((
ERR_STRING_DATA
*
)
b_void
)
->
error
));
return
((
int
)(((
const
ERR_STRING_DATA
*
)
a_void
)
->
error
-
((
const
ERR_STRING_DATA
*
)
b_void
)
->
error
));
}
/* static unsigned long pid_hash(ERR_STATE *a) */
static
unsigned
long
pid_hash
(
const
void
*
a_void
)
{
return
(((
ERR_STATE
*
)
a_void
)
->
pid
*
13
);
return
(((
const
ERR_STATE
*
)
a_void
)
->
pid
*
13
);
}
/* static int pid_cmp(ERR_STATE *a, ERR_STATE *b) */
static
int
pid_cmp
(
const
void
*
a_void
,
const
void
*
b_void
)
{
return
((
int
)((
long
)((
ERR_STATE
*
)
a_void
)
->
pid
-
(
long
)((
ERR_STATE
*
)
b_void
)
->
pid
));
return
((
int
)((
long
)((
const
ERR_STATE
*
)
a_void
)
->
pid
-
(
long
)((
const
ERR_STATE
*
)
b_void
)
->
pid
));
}
void
ERR_remove_state
(
unsigned
long
pid
)
...
...
@@ -1075,7 +1075,7 @@ void ERR_add_error_data(int num, ...)
else
str
=
p
;
}
BUF_strlcat
(
str
,
a
,
s
+
1
);
BUF_strlcat
(
str
,
a
,
(
size_t
)
s
+
1
);
}
}
ERR_set_error_data
(
str
,
ERR_TXT_MALLOCED
|
ERR_TXT_STRING
);
...
...
crypto/evp/evp_pbe.c
浏览文件 @
70f34a58
...
...
@@ -106,7 +106,8 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
static
int
pbe_cmp
(
const
char
*
const
*
a
,
const
char
*
const
*
b
)
{
EVP_PBE_CTL
**
pbe1
=
(
EVP_PBE_CTL
**
)
a
,
**
pbe2
=
(
EVP_PBE_CTL
**
)
b
;
const
EVP_PBE_CTL
*
const
*
pbe1
=
(
const
EVP_PBE_CTL
*
const
*
)
a
,
*
const
*
pbe2
=
(
const
EVP_PBE_CTL
*
const
*
)
b
;
return
((
*
pbe1
)
->
pbe_nid
-
(
*
pbe2
)
->
pbe_nid
);
}
...
...
crypto/evp/evp_pkey.c
浏览文件 @
70f34a58
...
...
@@ -414,8 +414,6 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken)
default:
EVPerr
(
EVP_F_EVP_PKCS8_SET_BROKEN
,
EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE
);
return
NULL
;
break
;
}
}
...
...
crypto/evp/names.c
浏览文件 @
70f34a58
...
...
@@ -66,9 +66,9 @@ int EVP_add_cipher(const EVP_CIPHER *c)
{
int
r
;
r
=
OBJ_NAME_add
(
OBJ_nid2sn
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
char
*
)
c
);
r
=
OBJ_NAME_add
(
OBJ_nid2sn
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
c
onst
c
har
*
)
c
);
if
(
r
==
0
)
return
(
0
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
char
*
)
c
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
c
onst
c
har
*
)
c
);
return
(
r
);
}
...
...
@@ -78,9 +78,9 @@ int EVP_add_digest(const EVP_MD *md)
const
char
*
name
;
name
=
OBJ_nid2sn
(
md
->
type
);
r
=
OBJ_NAME_add
(
name
,
OBJ_NAME_TYPE_MD_METH
,(
char
*
)
md
);
r
=
OBJ_NAME_add
(
name
,
OBJ_NAME_TYPE_MD_METH
,(
c
onst
c
har
*
)
md
);
if
(
r
==
0
)
return
(
0
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
md
->
type
),
OBJ_NAME_TYPE_MD_METH
,(
char
*
)
md
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
md
->
type
),
OBJ_NAME_TYPE_MD_METH
,(
c
onst
c
har
*
)
md
);
if
(
r
==
0
)
return
(
0
);
if
(
md
->
type
!=
md
->
pkey_type
)
...
...
crypto/lhash/lhash.c
浏览文件 @
70f34a58
...
...
@@ -180,7 +180,7 @@ void *lh_insert(LHASH *lh, void *data)
{
unsigned
long
hash
;
LHASH_NODE
*
nn
,
**
rn
;
const
void
*
ret
;
void
*
ret
;
lh
->
error
=
0
;
if
(
lh
->
up_load
<=
(
lh
->
num_items
*
LH_LOAD_MULT
/
lh
->
num_nodes
))
...
...
@@ -211,14 +211,14 @@ void *lh_insert(LHASH *lh, void *data)
(
*
rn
)
->
data
=
data
;
lh
->
num_replace
++
;
}
return
(
(
void
*
)
ret
);
return
(
ret
);
}
void
*
lh_delete
(
LHASH
*
lh
,
const
void
*
data
)
{
unsigned
long
hash
;
LHASH_NODE
*
nn
,
**
rn
;
const
void
*
ret
;
void
*
ret
;
lh
->
error
=
0
;
rn
=
getrn
(
lh
,
data
,
&
hash
);
...
...
@@ -242,14 +242,14 @@ void *lh_delete(LHASH *lh, const void *data)
(
lh
->
down_load
>=
(
lh
->
num_items
*
LH_LOAD_MULT
/
lh
->
num_nodes
)))
contract
(
lh
);
return
(
(
void
*
)
ret
);
return
(
ret
);
}
void
*
lh_retrieve
(
LHASH
*
lh
,
const
void
*
data
)
{
unsigned
long
hash
;
LHASH_NODE
**
rn
;
const
void
*
ret
;
void
*
ret
;
lh
->
error
=
0
;
rn
=
getrn
(
lh
,
data
,
&
hash
);
...
...
@@ -264,7 +264,7 @@ void *lh_retrieve(LHASH *lh, const void *data)
ret
=
(
*
rn
)
->
data
;
lh
->
num_retrieve
++
;
}
return
(
(
void
*
)
ret
);
return
(
ret
);
}
static
void
doall_util_fn
(
LHASH
*
lh
,
int
use_arg
,
LHASH_DOALL_FN_TYPE
func
,
...
...
@@ -339,7 +339,7 @@ static void expand(LHASH *lh)
{
j
=
(
int
)
lh
->
num_alloc_nodes
*
2
;
n
=
(
LHASH_NODE
**
)
OPENSSL_realloc
(
lh
->
b
,
(
unsigned
int
)
sizeof
(
LHASH_NODE
*
)
*
j
);
(
int
)(
sizeof
(
LHASH_NODE
*
)
*
j
)
);
if
(
n
==
NULL
)
{
/* fputs("realloc error in lhash",stderr); */
...
...
crypto/objects/o_names.c
浏览文件 @
70f34a58
...
...
@@ -111,8 +111,8 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
static
int
obj_name_cmp
(
const
void
*
a_void
,
const
void
*
b_void
)
{
int
ret
;
OBJ_NAME
*
a
=
(
OBJ_NAME
*
)
a_void
;
OBJ_NAME
*
b
=
(
OBJ_NAME
*
)
b_void
;
const
OBJ_NAME
*
a
=
(
const
OBJ_NAME
*
)
a_void
;
const
OBJ_NAME
*
b
=
(
const
OBJ_NAME
*
)
b_void
;
ret
=
a
->
type
-
b
->
type
;
if
(
ret
==
0
)
...
...
@@ -133,7 +133,7 @@ static int obj_name_cmp(const void *a_void, const void *b_void)
static
unsigned
long
obj_name_hash
(
const
void
*
a_void
)
{
unsigned
long
ret
;
OBJ_NAME
*
a
=
(
OBJ_NAME
*
)
a_void
;
const
OBJ_NAME
*
a
=
(
const
OBJ_NAME
*
)
a_void
;
if
((
name_funcs_stack
!=
NULL
)
&&
(
sk_NAME_FUNCS_num
(
name_funcs_stack
)
>
a
->
type
))
{
...
...
crypto/objects/obj_dat.c
浏览文件 @
70f34a58
...
...
@@ -115,7 +115,7 @@ static unsigned long add_hash(const void *ca_void)
int
i
;
unsigned
long
ret
=
0
;
unsigned
char
*
p
;
ADDED_OBJ
*
ca
=
(
ADDED_OBJ
*
)
ca_void
;
const
ADDED_OBJ
*
ca
=
(
const
ADDED_OBJ
*
)
ca_void
;
a
=
ca
->
obj
;
switch
(
ca
->
type
)
...
...
@@ -149,8 +149,8 @@ static int add_cmp(const void *ca_void, const void *cb_void)
{
ASN1_OBJECT
*
a
,
*
b
;
int
i
;
ADDED_OBJ
*
ca
=
(
ADDED_OBJ
*
)
ca_void
;
ADDED_OBJ
*
cb
=
(
ADDED_OBJ
*
)
cb_void
;
const
ADDED_OBJ
*
ca
=
(
const
ADDED_OBJ
*
)
ca_void
;
const
ADDED_OBJ
*
cb
=
(
const
ADDED_OBJ
*
)
cb_void
;
i
=
ca
->
type
-
cb
->
type
;
if
(
i
)
return
(
i
);
...
...
@@ -161,7 +161,7 @@ static int add_cmp(const void *ca_void, const void *cb_void)
case
ADDED_DATA
:
i
=
(
a
->
length
-
b
->
length
);
if
(
i
)
return
(
i
);
return
(
memcmp
(
a
->
data
,
b
->
data
,
a
->
length
));
return
(
memcmp
(
a
->
data
,
b
->
data
,
(
size_t
)
a
->
length
));
case
ADDED_SNAME
:
if
(
a
->
sn
==
NULL
)
return
(
-
1
);
else
if
(
b
->
sn
==
NULL
)
return
(
1
);
...
...
@@ -382,8 +382,8 @@ int OBJ_obj2nid(const ASN1_OBJECT *a)
adp
=
(
ADDED_OBJ
*
)
lh_retrieve
(
added
,
&
ad
);
if
(
adp
!=
NULL
)
return
(
adp
->
obj
->
nid
);
}
op
=
(
ASN1_OBJECT
**
)
OBJ_bsearch
((
c
har
*
)
&
a
,(
char
*
)
obj_objs
,
NUM_OBJ
,
sizeof
(
ASN1_OBJECT
*
),
obj_cmp
);
op
=
(
ASN1_OBJECT
**
)
OBJ_bsearch
((
c
onst
char
*
)
&
a
,(
const
char
*
)
obj_objs
,
NUM_OBJ
,
sizeof
(
ASN1_OBJECT
*
),
obj_cmp
);
if
(
op
==
NULL
)
return
(
NID_undef
);
return
((
*
op
)
->
nid
);
...
...
@@ -521,7 +521,7 @@ int OBJ_ln2nid(const char *s)
adp
=
(
ADDED_OBJ
*
)
lh_retrieve
(
added
,
&
ad
);
if
(
adp
!=
NULL
)
return
(
adp
->
obj
->
nid
);
}
op
=
(
ASN1_OBJECT
**
)
OBJ_bsearch
((
char
*
)
&
oo
,(
char
*
)
ln_objs
,
NUM_LN
,
op
=
(
ASN1_OBJECT
**
)
OBJ_bsearch
((
char
*
)
&
oo
,(
char
*
)
ln_objs
,
NUM_LN
,
sizeof
(
ASN1_OBJECT
*
),
ln_cmp
);
if
(
op
==
NULL
)
return
(
NID_undef
);
return
((
*
op
)
->
nid
);
...
...
@@ -549,8 +549,8 @@ int OBJ_sn2nid(const char *s)
static
int
obj_cmp
(
const
void
*
ap
,
const
void
*
bp
)
{
int
j
;
ASN1_OBJECT
*
a
=
*
(
ASN1_OBJECT
*
*
)
ap
;
ASN1_OBJECT
*
b
=
*
(
ASN1_OBJECT
*
*
)
bp
;
const
ASN1_OBJECT
*
a
=
*
(
ASN1_OBJECT
*
const
*
)
ap
;
const
ASN1_OBJECT
*
b
=
*
(
ASN1_OBJECT
*
const
*
)
bp
;
j
=
(
a
->
length
-
b
->
length
);
if
(
j
)
return
(
j
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录