From 17efbe9f485f8f3175ab31f20ce4535667d663a0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Sep 2005 12:19:09 +0200 Subject: [PATCH] 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. --- extra/yassl/taocrypt/src/random.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); + } }