Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
7bbce697
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,发现更多精彩内容 >>
提交
7bbce697
编写于
9月 24, 2007
作者:
L
Lutz Jänicke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Port from 0.9.8-stable
上级
870d6541
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
14 addition
and
2 deletion
+14
-2
FAQ
FAQ
+11
-0
crypto/rand/rand_lib.c
crypto/rand/rand_lib.c
+0
-2
doc/crypto/RAND_bytes.pod
doc/crypto/RAND_bytes.pod
+3
-0
未找到文件。
FAQ
浏览文件 @
7bbce697
...
@@ -67,6 +67,7 @@ OpenSSL - Frequently Asked Questions
...
@@ -67,6 +67,7 @@ OpenSSL - Frequently Asked Questions
* Why doesn't my server application receive a client certificate?
* Why doesn't my server application receive a client certificate?
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
* I think I've detected a memory leak, is this a bug?
* I think I've detected a memory leak, is this a bug?
* Why does Valgrind complain about the use of uninitialized data?
* Why doesn't a memory BIO work when a file does?
* Why doesn't a memory BIO work when a file does?
===============================================================================
===============================================================================
...
@@ -917,6 +918,16 @@ thread-safe):
...
@@ -917,6 +918,16 @@ thread-safe):
ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().
ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().
* Why does Valgrind complain about the use of uninitialized data?
When OpenSSL's PRNG routines are called to generate random numbers the supplied
buffer contents are mixed into the entropy pool: so it technically does not
matter whether the buffer is initialized at this point or not. Valgrind (and
other test tools) will complain about this. When using Valgrind, make sure the
OpenSSL library has been compiled with the PURIFY macro defined (-DPURIFY)
to get rid of these warnings.
* Why doesn't a memory BIO work when a file does?
* Why doesn't a memory BIO work when a file does?
This can occur in several cases for example reading an S/MIME email message.
This can occur in several cases for example reading an S/MIME email message.
...
...
crypto/rand/rand_lib.c
浏览文件 @
7bbce697
...
@@ -154,7 +154,6 @@ void RAND_add(const void *buf, int num, double entropy)
...
@@ -154,7 +154,6 @@ void RAND_add(const void *buf, int num, double entropy)
int
RAND_bytes
(
unsigned
char
*
buf
,
int
num
)
int
RAND_bytes
(
unsigned
char
*
buf
,
int
num
)
{
{
const
RAND_METHOD
*
meth
=
RAND_get_rand_method
();
const
RAND_METHOD
*
meth
=
RAND_get_rand_method
();
memset
(
buf
,
0
,
num
);
if
(
meth
&&
meth
->
bytes
)
if
(
meth
&&
meth
->
bytes
)
return
meth
->
bytes
(
buf
,
num
);
return
meth
->
bytes
(
buf
,
num
);
return
(
-
1
);
return
(
-
1
);
...
@@ -163,7 +162,6 @@ int RAND_bytes(unsigned char *buf, int num)
...
@@ -163,7 +162,6 @@ int RAND_bytes(unsigned char *buf, int num)
int
RAND_pseudo_bytes
(
unsigned
char
*
buf
,
int
num
)
int
RAND_pseudo_bytes
(
unsigned
char
*
buf
,
int
num
)
{
{
const
RAND_METHOD
*
meth
=
RAND_get_rand_method
();
const
RAND_METHOD
*
meth
=
RAND_get_rand_method
();
memset
(
buf
,
0
,
num
);
if
(
meth
&&
meth
->
pseudorand
)
if
(
meth
&&
meth
->
pseudorand
)
return
meth
->
pseudorand
(
buf
,
num
);
return
meth
->
pseudorand
(
buf
,
num
);
return
(
-
1
);
return
(
-
1
);
...
...
doc/crypto/RAND_bytes.pod
浏览文件 @
7bbce697
...
@@ -25,6 +25,9 @@ unpredictable. They can be used for non-cryptographic purposes and for
...
@@ -25,6 +25,9 @@ unpredictable. They can be used for non-cryptographic purposes and for
certain purposes in cryptographic protocols, but usually not for key
certain purposes in cryptographic protocols, but usually not for key
generation etc.
generation etc.
The contents of B<buf> is mixed into the entropy pool before retrieving
the new pseudo-random bytes unless disabled at compile time (see FAQ).
=head1 RETURN VALUES
=head1 RETURN VALUES
RAND_bytes() returns 1 on success, 0 otherwise. The error code can be
RAND_bytes() returns 1 on success, 0 otherwise. The error code can be
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录