summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2005-09-22 12:19:09 +0200
committerunknown <msvensson@neptunus.(none)>2005-09-22 12:19:09 +0200
commit17efbe9f485f8f3175ab31f20ce4535667d663a0 (patch)
tree3a7ce543027a7465fd5c327e173d201f77a9a1e4 /extra
parentb50eb4cd42d2d5073afb2af5af8b19c825a9cca1 (diff)
downloadmariadb-git-17efbe9f485f8f3175ab31f20ce4535667d663a0.tar.gz
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.
Diffstat (limited to 'extra')
-rw-r--r--extra/yassl/taocrypt/src/random.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/extra/yassl/taocrypt/src/random.cpp b/extra/yassl/taocrypt/src/random.cpp
index e1e6416eb00..cf0720b11d8 100644
--- a/extra/yassl/taocrypt/src/random.cpp
+++ b/extra/yassl/taocrypt/src/random.cpp
@@ -95,7 +95,11 @@ 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);
+ }
}