[#63592] [ruby-trunk - Bug #10009] IO operation is 10x slower in multi-thread environment — normalperson@...
Issue #10009 has been updated by Eric Wong.
3 messages
2014/07/08
[#63682] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/13
[#63703] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/14
[#63743] [ruby-trunk - Bug #10037] Since r46798 on Solaris, "[BUG] rb_vm_get_cref: unreachable" during make — ngotogenome@...
Issue #10037 has been updated by Naohisa Goto.
3 messages
2014/07/15
[#64136] Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb — "Jeffrey 'jf' Lim" <jfs.world@...>
As per subject.
4 messages
2014/07/31
[#64138] Re: Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb
— "Jeffrey 'jf' Lim" <jfs.world@...>
2014/07/31
On Thu, Jul 31, 2014 at 6:03 PM, Jeffrey 'jf' Lim <[email protected]>
[ruby-core:63843] [ruby-trunk - Bug #10053] OpenSSL: incorrect return value check of EGD functions
From:
wtnelson@...
Date:
2014-07-18 23:35:40 UTC
List:
ruby-core #63843
Issue #10053 has been updated by William T. Nelson.
The Entropy Gathering Daemon was last updated twelve years ago.
Ruby should deprecate the use of egd functions and provide configuration options to use LibreSSL in place of OpenSSL, just like how the Editline Library can be used in place of GNU Readline.
----------------------------------------
Bug #10053: OpenSSL: incorrect return value check of EGD functions
https://bugs.ruby-lang.org/issues/10053#change-47875
* Author: cremno phobia
* Status: Open
* Priority: Normal
* Assignee: openssl
* Category: ext/openssl
* Target version: current: 2.2.0
* ruby -v: all
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
https://www.openssl.org/docs/crypto/RAND_egd.html#RETURN_VALUE
~~~diff
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index 270a4b7..a9188bc 100644
--- a/ext/openssl/ossl_rand.c
+++ b/ext/openssl/ossl_rand.c
@@ -135,7 +135,7 @@ ossl_rand_egd(VALUE self, VALUE filename)
{
SafeStringValue(filename);
- if(!RAND_egd(RSTRING_PTR(filename))) {
+ if (RAND_egd(RSTRING_PTR(filename)) == -1) {
ossl_raise(eRandomError, NULL);
}
return Qtrue;
@@ -153,7 +153,7 @@ ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len)
SafeStringValue(filename);
- if (!RAND_egd_bytes(RSTRING_PTR(filename), n)) {
+ if (RAND_egd_bytes(RSTRING_PTR(filename), n) == -1) {
ossl_raise(eRandomError, NULL);
}
return Qtrue;
~~~
Maybe an error message (e.g. `"EGD connection failed or not enough data returned to fully seed the PRNG"`) should also be added.
--
https://bugs.ruby-lang.org/