Commit 17efbe9f authored by unknown's avatar unknown

Bug #13164 yassl: "SSL connection error" on several platforms

 - it's a requirement fo yaSSL that either /dev/urandom or /dev/random is available on the target system.
 - Added a fix that tries to open /dev/random if /dev/urandom is not available.


extra/yassl/taocrypt/src/random.cpp:
  Try to open /dev/ranom if /dev/urandom is not available.
parent b50eb4cd
...@@ -95,7 +95,11 @@ OS_Seed::OS_Seed() ...@@ -95,7 +95,11 @@ OS_Seed::OS_Seed()
{ {
fd_ = open("/dev/urandom",O_RDONLY); fd_ = open("/dev/urandom",O_RDONLY);
if (fd_ == -1) if (fd_ == -1)
{
fd_ = open("/dev/random",O_RDONLY);
if (fd_ == -1)
error_.SetError(OPEN_RAN_E); error_.SetError(OPEN_RAN_E);
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment