Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
71a07ca7
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看板
提交
71a07ca7
编写于
3月 09, 2016
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert the dynlocks in e_chil to the new Thread API locks
Reviewed-by:
N
Matt Caswell
<
matt@openssl.org
>
上级
af48aa71
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
14 deletion
+10
-14
engines/e_chil.c
engines/e_chil.c
+10
-14
未找到文件。
engines/e_chil.c
浏览文件 @
71a07ca7
...
@@ -246,7 +246,7 @@ static const char *engine_hwcrhk_id_alt = "ncipher";
...
@@ -246,7 +246,7 @@ static const char *engine_hwcrhk_id_alt = "ncipher";
* into HWCryptoHook_Mutex
* into HWCryptoHook_Mutex
*/
*/
struct
HWCryptoHook_MutexValue
{
struct
HWCryptoHook_MutexValue
{
int
lockid
;
CRYPTO_RWLOCK
*
lock
;
};
};
/*
/*
...
@@ -597,14 +597,10 @@ static int hwcrhk_init(ENGINE *e)
...
@@ -597,14 +597,10 @@ static int hwcrhk_init(ENGINE *e)
* does, use them.
* does, use them.
*/
*/
if
(
disable_mutex_callbacks
==
0
)
{
if
(
disable_mutex_callbacks
==
0
)
{
if
(
CRYPTO_get_dynlock_create_callback
()
!=
NULL
&&
hwcrhk_globals
.
mutex_init
=
hwcrhk_mutex_init
;
CRYPTO_get_dynlock_lock_callback
()
!=
NULL
&&
hwcrhk_globals
.
mutex_acquire
=
hwcrhk_mutex_lock
;
CRYPTO_get_dynlock_destroy_callback
()
!=
NULL
)
{
hwcrhk_globals
.
mutex_release
=
hwcrhk_mutex_unlock
;
hwcrhk_globals
.
mutex_init
=
hwcrhk_mutex_init
;
hwcrhk_globals
.
mutex_destroy
=
hwcrhk_mutex_destroy
;
hwcrhk_globals
.
mutex_acquire
=
hwcrhk_mutex_lock
;
hwcrhk_globals
.
mutex_release
=
hwcrhk_mutex_unlock
;
hwcrhk_globals
.
mutex_destroy
=
hwcrhk_mutex_destroy
;
}
}
}
/*
/*
...
@@ -1145,26 +1141,26 @@ static int hwcrhk_rand_status(void)
...
@@ -1145,26 +1141,26 @@ static int hwcrhk_rand_status(void)
static
int
hwcrhk_mutex_init
(
HWCryptoHook_Mutex
*
mt
,
static
int
hwcrhk_mutex_init
(
HWCryptoHook_Mutex
*
mt
,
HWCryptoHook_CallerContext
*
cactx
)
HWCryptoHook_CallerContext
*
cactx
)
{
{
mt
->
lock
id
=
CRYPTO_get_new_dynlockid
();
mt
->
lock
=
CRYPTO_THREAD_lock_new
();
if
(
mt
->
lock
id
==
0
)
if
(
mt
->
lock
==
NULL
)
return
1
;
/* failure */
return
1
;
/* failure */
return
0
;
/* success */
return
0
;
/* success */
}
}
static
int
hwcrhk_mutex_lock
(
HWCryptoHook_Mutex
*
mt
)
static
int
hwcrhk_mutex_lock
(
HWCryptoHook_Mutex
*
mt
)
{
{
CRYPTO_
w_lock
(
mt
->
lockid
);
CRYPTO_
THREAD_write_lock
(
mt
->
lock
);
return
0
;
return
0
;
}
}
static
void
hwcrhk_mutex_unlock
(
HWCryptoHook_Mutex
*
mt
)
static
void
hwcrhk_mutex_unlock
(
HWCryptoHook_Mutex
*
mt
)
{
{
CRYPTO_
w_unlock
(
mt
->
lockid
);
CRYPTO_
THREAD_unlock
(
mt
->
lock
);
}
}
static
void
hwcrhk_mutex_destroy
(
HWCryptoHook_Mutex
*
mt
)
static
void
hwcrhk_mutex_destroy
(
HWCryptoHook_Mutex
*
mt
)
{
{
CRYPTO_
destroy_dynlockid
(
mt
->
lockid
);
CRYPTO_
THREAD_lock_free
(
mt
->
lock
);
}
}
static
int
hwcrhk_get_pass
(
const
char
*
prompt_info
,
static
int
hwcrhk_get_pass
(
const
char
*
prompt_info
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录