Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
4bd4afa3
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看板
提交
4bd4afa3
编写于
5月 19, 2008
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change use of CRYPTO_THREADID so that we always use both the ulong and
ptr members. (So if the id_callback is bogus, we still have &errno.)
上级
148bb951
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
10 deletion
+16
-10
CHANGES
CHANGES
+6
-1
crypto/cryptlib.c
crypto/cryptlib.c
+9
-8
crypto/crypto.h
crypto/crypto.h
+1
-1
未找到文件。
CHANGES
浏览文件 @
4bd4afa3
...
...
@@ -4,7 +4,12 @@
Changes between 0.9.8g and 0.9.9 [xx XXX xxxx]
*) To support arbitrarily-typed thread IDs, deprecate the existing
*) Not all of this is true any longer.
Will have to be updated to reflect all subsequent changes to cryptlib.c.
--bodo
To support arbitrarily-typed thread IDs, deprecate the existing
type-specific APIs for a general purpose CRYPTO_THREADID
interface. Applications can choose the thread ID
callback type it wishes to register, as before;
...
...
crypto/cryptlib.c
浏览文件 @
4bd4afa3
...
...
@@ -434,29 +434,30 @@ void CRYPTO_set_idptr_callback(void *(*func)(void))
void
CRYPTO_THREADID_set
(
CRYPTO_THREADID
*
id
)
{
memset
(
id
,
0
,
sizeof
(
*
id
));
if
(
id_callback
)
id
->
ulong
=
id_callback
();
else
id
->
ulong
=
0
;
if
(
idptr_callback
)
id
->
ptr
=
idptr_callback
();
else
if
(
id_callback
)
id
->
ulong
=
id_callback
();
else
id
->
ptr
=
&
errno
;
}
int
CRYPTO_THREADID_cmp
(
const
CRYPTO_THREADID
*
id1
,
const
CRYPTO_THREADID
*
id2
)
{
if
(
id1
->
ulong
!=
id2
->
ulong
)
return
((
id1
->
ulong
<
id2
->
ulong
)
?
-
1
:
1
);
if
(
id1
->
ptr
!=
id2
->
ptr
)
return
((
id1
->
ptr
<
id2
->
ptr
)
?
-
1
:
1
);
if
(
id1
->
ulong
!=
id2
->
ulong
)
return
((
id1
->
ulong
<
id2
->
ulong
)
?
-
1
:
1
);
return
0
;
}
unsigned
long
CRYPTO_THREADID_hash
(
const
CRYPTO_THREADID
*
id
)
{
if
(
idptr_callback
||
!
id_callback
)
return
(
unsigned
long
)
id
->
ptr
;
return
id
->
ulong
;
/* will need further processing to arrive at a good hash (mem_dbg.c uses this) */
return
id
->
ulong
+
(
unsigned
long
)
id
->
ptr
;
}
void
CRYPTO_THREADID_cpy
(
CRYPTO_THREADID
*
dst
,
const
CRYPTO_THREADID
*
src
)
...
...
crypto/crypto.h
浏览文件 @
4bd4afa3
...
...
@@ -307,8 +307,8 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
* apart when someone decides to extend this in some way. */
typedef
struct
crypto_threadid
{
void
*
ptr
;
unsigned
long
ulong
;
void
*
ptr
;
}
CRYPTO_THREADID
;
/* Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录