mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
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.
This commit is contained in:
parent
8369e7de8a
commit
139601f997
1 changed files with 4 additions and 0 deletions
|
@ -94,8 +94,12 @@ void OS_Seed::GenerateSeed(byte* output, word32 sz)
|
|||
OS_Seed::OS_Seed()
|
||||
{
|
||||
fd_ = open("/dev/urandom",O_RDONLY);
|
||||
if (fd_ == -1)
|
||||
{
|
||||
fd_ = open("/dev/random",O_RDONLY);
|
||||
if (fd_ == -1)
|
||||
error_.SetError(OPEN_RAN_E);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue