Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5eb8ca4d
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
8 个月 前同步成功
通知
8
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,体验更适合开发者的 AI 搜索 >>
提交
5eb8ca4d
编写于
3月 02, 2000
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use RAND_METHOD for implementing RAND_status.
上级
2d092edf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
1 deletion
+16
-1
CHANGES
CHANGES
+5
-0
crypto/rand/md_rand.c
crypto/rand/md_rand.c
+3
-1
crypto/rand/rand.h
crypto/rand/rand.h
+1
-0
crypto/rand/rand_lib.c
crypto/rand/rand_lib.c
+7
-0
未找到文件。
CHANGES
浏览文件 @
5eb8ca4d
...
...
@@ -4,6 +4,11 @@
Changes between 0.9.5 and 0.9.6 [XX XXX 2000]
*) Include RAND_status() into RAND_METHOD instead of implementing
it only for md_rand.c Otherwise replacing the PRNG by calling
RAND_set_rand_method would be impossible.
[Bodo Moeller]
*) Don't let DSA_generate_key() enter an infinite loop if the random
number generation fails.
[Bodo Moeller]
...
...
crypto/rand/md_rand.c
浏览文件 @
5eb8ca4d
...
...
@@ -156,6 +156,7 @@ static void ssleay_rand_seed(const void *buf, int num);
static
void
ssleay_rand_add
(
const
void
*
buf
,
int
num
,
double
add_entropy
);
static
int
ssleay_rand_bytes
(
unsigned
char
*
buf
,
int
num
);
static
int
ssleay_rand_pseudo_bytes
(
unsigned
char
*
buf
,
int
num
);
static
int
ssleay_rand_status
(
void
);
RAND_METHOD
rand_ssleay_meth
=
{
ssleay_rand_seed
,
...
...
@@ -163,6 +164,7 @@ RAND_METHOD rand_ssleay_meth={
ssleay_rand_cleanup
,
ssleay_rand_add
,
ssleay_rand_pseudo_bytes
,
ssleay_rand_status
};
RAND_METHOD
*
RAND_SSLeay
(
void
)
...
...
@@ -502,7 +504,7 @@ static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
return
(
ret
);
}
int
RAND
_status
(
void
)
static
int
ssleay_rand
_status
(
void
)
{
if
(
!
initialized
)
ssleay_rand_initialize
();
...
...
crypto/rand/rand.h
浏览文件 @
5eb8ca4d
...
...
@@ -70,6 +70,7 @@ typedef struct rand_meth_st
void
(
*
cleanup
)(
void
);
void
(
*
add
)(
const
void
*
buf
,
int
num
,
double
entropy
);
int
(
*
pseudorand
)(
unsigned
char
*
buf
,
int
num
);
int
(
*
status
)(
void
);
}
RAND_METHOD
;
#ifdef BN_DEBUG
...
...
crypto/rand/rand_lib.c
浏览文件 @
5eb8ca4d
...
...
@@ -108,3 +108,10 @@ int RAND_pseudo_bytes(unsigned char *buf, int num)
return
rand_meth
->
pseudorand
(
buf
,
num
);
return
(
-
1
);
}
int
RAND_status
(
void
)
{
if
(
rand_meth
!=
NULL
)
return
rand_meth
->
status
();
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录