Hi,

Its entirly possible that I have this wrong, but I have been trying to debug a problem on AIX 5.1 wheer I seem to fail to open the socket of the entropy daemon. I still haven't fixed that yet, but I think I may have found a flaw in RAND_query_egd_bytes, at least in openssl-1.0.0d.

If the connect to the socket fails (in my case with a ECONNREFUSED), the loop is being broken abd the function exit's, but the return status is left at 0, so the calling app
does not see the problem.

diff -c crypto/rand/rand_egd.c crypto/rand/rand_egd.c.new
*** crypto/rand/rand_egd.c      Wed Nov 12 07:27:36 2008
--- crypto/rand/rand_egd.c.new  Mon Aug  1 11:45:22 2011
***************
*** 179,184 ****
--- 179,185 ----
                        break;
  #endif
                    default:
+                       ret = -1;
                        goto err;       /* failure */
                    }
                }

Hope that is of use, and makes some sense.

--
Nick Gorham
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to