Configuring PesudoRandom device

Marc Giannoni marc@archela.com
Thu, 16 Nov 2000 16:53:01 +0000 (GMT)


Version Info:

Horde-1.3.2-cvs
IMP-2.3.6-cvs

OK, I've finally "solved" one of my own problems!  My error message is:

Warning: cannot open source device in ../lib/Horde.php on line 191

This line of code reads:

$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_BLOWFISH);

Chasing this one down lead me to some code in "ext/mcrypt.c"
where the second parameter to "mcrypt_create_iv()" appears to 
determine the type of random generator to use:

0 = /dev/random
1 = /dev/urandom
2 = rand()

I don't have "/dev/random" -or- "/dev/urandom" on my Solaris-2.7 
platform, so I'll probably have to add a patch form SUN.  For now,
I just "hacked" the second parameter of "mcrypt_create_iv()" to "2"
which has solved this problem!

So My REAL question is:

Is there an IMP/HORDE config for choosing the random number generator,
or is this a bug in "ext/mcrypt.c", or is this a PHP-4 configuration?
I haven't located the "MCRYPT_BLOWFISH" define, but it appears to me to 
be place here by mistake.


Marc

WowMan... Far Out DooD!

-------------------------------------------------
This mail sent through IMP: archela.com