Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
63c75cd6
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
接近 2 年 前同步成功
通知
12
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看板
提交
63c75cd6
编写于
12月 24, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add lh_doall inlining
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
62d0577e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
11 addition
and
39 deletion
+11
-39
crypto/conf/conf_api.c
crypto/conf/conf_api.c
+1
-2
crypto/engine/eng_table.c
crypto/engine/eng_table.c
+1
-4
crypto/objects/o_names.c
crypto/objects/o_names.c
+1
-3
crypto/objects/obj_dat.c
crypto/objects/obj_dat.c
+3
-7
include/openssl/lhash.h
include/openssl/lhash.h
+5
-10
include/openssl/safestack.h
include/openssl/safestack.h
+0
-12
util/mkstack.pl
util/mkstack.pl
+0
-1
未找到文件。
crypto/conf/conf_api.c
浏览文件 @
63c75cd6
...
...
@@ -75,7 +75,6 @@ static void value_free_hash_doall_arg(CONF_VALUE *a,
static
void
value_free_stack_doall
(
CONF_VALUE
*
a
);
static
IMPLEMENT_LHASH_DOALL_ARG_FN
(
value_free_hash
,
CONF_VALUE
,
LHASH_OF
(
CONF_VALUE
))
static
IMPLEMENT_LHASH_DOALL_FN
(
value_free_stack
,
CONF_VALUE
)
/* Up until OpenSSL 0.9.5a, this was get_section */
CONF_VALUE
*
_CONF_get_section
(
const
CONF
*
conf
,
const
char
*
section
)
...
...
@@ -210,7 +209,7 @@ void _CONF_free_data(CONF *conf)
* with
*/
lh_CONF_VALUE_doall
(
conf
->
data
,
LHASH_DOALL_FN
(
value_free_stack
)
);
lh_CONF_VALUE_doall
(
conf
->
data
,
value_free_stack_doall
);
lh_CONF_VALUE_free
(
conf
->
data
);
}
...
...
crypto/engine/eng_table.c
浏览文件 @
63c75cd6
...
...
@@ -219,14 +219,11 @@ static void int_cleanup_cb_doall(ENGINE_PILE *p)
OPENSSL_free
(
p
);
}
static
IMPLEMENT_LHASH_DOALL_FN
(
int_cleanup_cb
,
ENGINE_PILE
)
void
engine_table_cleanup
(
ENGINE_TABLE
**
table
)
{
CRYPTO_w_lock
(
CRYPTO_LOCK_ENGINE
);
if
(
*
table
)
{
lh_ENGINE_PILE_doall
(
&
(
*
table
)
->
piles
,
LHASH_DOALL_FN
(
int_cleanup_cb
));
lh_ENGINE_PILE_doall
(
&
(
*
table
)
->
piles
,
int_cleanup_cb_doall
);
lh_ENGINE_PILE_free
(
&
(
*
table
)
->
piles
);
*
table
=
NULL
;
}
...
...
crypto/objects/o_names.c
浏览文件 @
63c75cd6
...
...
@@ -320,8 +320,6 @@ static void names_lh_free_doall(OBJ_NAME *onp)
OBJ_NAME_remove
(
onp
->
name
,
onp
->
type
);
}
static
IMPLEMENT_LHASH_DOALL_FN
(
names_lh_free
,
OBJ_NAME
)
static
void
name_funcs_free
(
NAME_FUNCS
*
ptr
)
{
OPENSSL_free
(
ptr
);
...
...
@@ -338,7 +336,7 @@ void OBJ_NAME_cleanup(int type)
down_load
=
lh_OBJ_NAME_get_down_load
(
names_lh
);
lh_OBJ_NAME_set_down_load
(
names_lh
,
0
);
lh_OBJ_NAME_doall
(
names_lh
,
LHASH_DOALL_FN
(
names_lh_free
)
);
lh_OBJ_NAME_doall
(
names_lh
,
names_lh_free_doall
);
if
(
type
<
0
)
{
lh_OBJ_NAME_free
(
names_lh
);
sk_NAME_FUNCS_pop_free
(
name_funcs_stack
,
name_funcs_free
);
...
...
crypto/objects/obj_dat.c
浏览文件 @
63c75cd6
...
...
@@ -199,10 +199,6 @@ static void cleanup3_doall(ADDED_OBJ *a)
OPENSSL_free
(
a
);
}
static
IMPLEMENT_LHASH_DOALL_FN
(
cleanup1
,
ADDED_OBJ
)
static
IMPLEMENT_LHASH_DOALL_FN
(
cleanup2
,
ADDED_OBJ
)
static
IMPLEMENT_LHASH_DOALL_FN
(
cleanup3
,
ADDED_OBJ
)
/*
* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting to
* use freed up OIDs. If necessary the actual freeing up of OIDs is delayed.
...
...
@@ -224,9 +220,9 @@ void OBJ_cleanup(void)
if
(
added
==
NULL
)
return
;
lh_ADDED_OBJ_set_down_load
(
added
,
0
);
lh_ADDED_OBJ_doall
(
added
,
LHASH_DOALL_FN
(
cleanup1
)
);
/* zero counters */
lh_ADDED_OBJ_doall
(
added
,
LHASH_DOALL_FN
(
cleanup2
)
);
/* set counters */
lh_ADDED_OBJ_doall
(
added
,
LHASH_DOALL_FN
(
cleanup3
)
);
/* free objects */
lh_ADDED_OBJ_doall
(
added
,
cleanup1_doall
);
/* zero counters */
lh_ADDED_OBJ_doall
(
added
,
cleanup2_doall
);
/* set counters */
lh_ADDED_OBJ_doall
(
added
,
cleanup3_doall
);
/* free objects */
lh_ADDED_OBJ_free
(
added
);
added
=
NULL
;
}
...
...
include/openssl/lhash.h
浏览文件 @
63c75cd6
...
...
@@ -113,15 +113,6 @@ typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
return name##_cmp(a,b); }
# define LHASH_COMP_FN(name) name##_LHASH_COMP
/* Third: "doall" functions */
# define DECLARE_LHASH_DOALL_FN(name, o_type) \
void name##_LHASH_DOALL(void *);
# define IMPLEMENT_LHASH_DOALL_FN(name, o_type) \
void name##_LHASH_DOALL(void *arg) { \
o_type *a = arg; \
name##_doall(a); }
# define LHASH_DOALL_FN(name) name##_LHASH_DOALL
/* Fourth: "doall_arg" functions */
# define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
void name##_LHASH_DOALL_ARG(void *, void *);
...
...
@@ -246,13 +237,17 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
{ \
lh_set_down_load((_LHASH *)lh, dl); \
} \
static inline void lh_##type##_doall(LHASH_OF(type) *lh, \
void (*doall)(type *)) \
{ \
lh_doall((_LHASH *)lh, (LHASH_DOALL_FN_TYPE)doall); \
} \
LHASH_OF(type)
# define CHECKED_LHASH_OF(type,lh) \
((_LHASH *)CHECKED_PTR_OF(LHASH_OF(type),lh))
/* Define wrapper functions. */
# define LHM_lh_doall(type, lh,fn) lh_doall(CHECKED_LHASH_OF(type, lh), fn)
# define LHM_lh_doall_arg(type, lh, fn, arg_type, arg) \
lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))
...
...
include/openssl/safestack.h
浏览文件 @
63c75cd6
...
...
@@ -231,51 +231,39 @@ DEFINE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)
*/
# define lh_ADDED_OBJ_doall(lh,fn) LHM_lh_doall(ADDED_OBJ,lh,fn)
# define lh_ADDED_OBJ_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(ADDED_OBJ,lh,fn,arg_type,arg)
# define lh_APP_INFO_doall(lh,fn) LHM_lh_doall(APP_INFO,lh,fn)
# define lh_APP_INFO_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(APP_INFO,lh,fn,arg_type,arg)
# define lh_CONF_VALUE_doall(lh,fn) LHM_lh_doall(CONF_VALUE,lh,fn)
# define lh_CONF_VALUE_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(CONF_VALUE,lh,fn,arg_type,arg)
# define lh_ENGINE_PILE_doall(lh,fn) LHM_lh_doall(ENGINE_PILE,lh,fn)
# define lh_ENGINE_PILE_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(ENGINE_PILE,lh,fn,arg_type,arg)
# define lh_ERR_STATE_doall(lh,fn) LHM_lh_doall(ERR_STATE,lh,fn)
# define lh_ERR_STATE_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(ERR_STATE,lh,fn,arg_type,arg)
# define lh_ERR_STRING_DATA_doall(lh,fn) LHM_lh_doall(ERR_STRING_DATA,lh,fn)
# define lh_ERR_STRING_DATA_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(ERR_STRING_DATA,lh,fn,arg_type,arg)
# define lh_FUNCTION_doall(lh,fn) LHM_lh_doall(FUNCTION,lh,fn)
# define lh_FUNCTION_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(FUNCTION,lh,fn,arg_type,arg)
# define lh_MEM_doall(lh,fn) LHM_lh_doall(MEM,lh,fn)
# define lh_MEM_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(MEM,lh,fn,arg_type,arg)
# define lh_OBJ_NAME_doall(lh,fn) LHM_lh_doall(OBJ_NAME,lh,fn)
# define lh_OBJ_NAME_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(OBJ_NAME,lh,fn,arg_type,arg)
# define lh_OPENSSL_CSTRING_doall(lh,fn) LHM_lh_doall(OPENSSL_CSTRING,lh,fn)
# define lh_OPENSSL_CSTRING_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(OPENSSL_CSTRING,lh,fn,arg_type,arg)
# define lh_OPENSSL_STRING_doall(lh,fn) LHM_lh_doall(OPENSSL_STRING,lh,fn)
# define lh_OPENSSL_STRING_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(OPENSSL_STRING,lh,fn,arg_type,arg)
# define lh_SSL_SESSION_doall(lh,fn) LHM_lh_doall(SSL_SESSION,lh,fn)
# define lh_SSL_SESSION_doall_arg(lh,fn,arg_type,arg) \
LHM_lh_doall_arg(SSL_SESSION,lh,fn,arg_type,arg)
...
...
util/mkstack.pl
浏览文件 @
63c75cd6
...
...
@@ -275,7 +275,6 @@ foreach $type_thing (sort @lhashlst) {
my
$lc_tt
=
lc
$type_thing
;
$new_stackfile
.=
<<EOF;
# define lh_${type_thing}_doall(lh,fn) LHM_lh_doall(${type_thing},lh,fn)
# define lh_${type_thing}_doall_arg(lh,fn,arg_type,arg) \\
LHM_lh_doall_arg(${type_thing},lh,fn,arg_type,arg)
EOF
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录