From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 Description of problem: The "openssl genrsa" command consistently hangs if the -rand option is used. Specifically, it goes into a (seemingly) never-ending malloc/read loop. (Using the -rand option is desirable, because by default, openssl gathers entropy from /dev/urandom instead of /dev/random.) Version-Release number of selected component (if applicable): openssl-0.9.7a-5 (My test system is fully up-to-date w/respect to errata updates.) How reproducible: Always Steps to Reproduce: openssl genrsa -rand /dev/urandom 1024 Actual Results: The openssl command goes into a malloc/read loop. Expected Results: The openssl command should have generated a certificate to stdout. (Removing the "-rand /dev/urandom" yields the expected results.) Additional info: This occurs on both 9 and 8.0; I haven't tested earlier releases yet.
Yes, that would be the expected behaviour. OpenSSL will try to seed the PRNG with the entire contents of the file specified with the -rand option. Since /dev/random never returns EOF, this will never terminate.