[newcomer][openssl] Generate random numbers when reading /dev/urandom or /dev/random
pickleburger opened this issue · 2 comments
Hello,
When an application (e.g. openssl) reads from /dev/random or /dev/urandom, we should supply with some random numbers in Repy. Current implementation will return empty string.
To reproduce the problem:
- Launch openssl console with Lind
- type "rand 16" after the command line prompt
- You will see something like "4278147336:error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG not seeded:md_rand.c:527:You need to read the OpenSSL FAQ, http://www.openssl.org/support/faq.html
error in rand"
This is a regression. Nitin wrote the original code to handle special case files and devices.
Sent from my iPhone
On Jun 18, 2013, at 7:06 AM, alexatnt notifications@github.com wrote:
Hello,
When an application (e.g. openssl) reads from /dev/random or /dev/urandom, we should supply with some random numbers in Repy. Current implementation will return empty string.
To reproduce the problem:
Launch openssl console with Lind
type "rand 16" after the command line prompt
You will see something like "4278147336:error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG not seeded:md_rand.c:527:You need to read the OpenSSL FAQ, http://www.openssl.org/support/faq.html error in rand"
—
Reply to this email directly or view it on GitHub.
You are right. The problem is the call overriding mechanism is changed in the new glibc. It breaks select
, with some others like poll
and getpid
. And openssl uses select
before reading from these dev files. It is fixed in the last commit.