[manse-modeemi] Re: OSF1 ja OpenSSL...ei lenna ei...

Jussi Hamalainen count@theblah.org
Mon Jun 26 15:09:06 2006


On Fri, 15 Nov 2002 17:05:35 +0000 (UTC), Tommi Raulahti wrote:

> kuten pitääkin. Ongelman ydin nyt näyttäisi olevan se että
> lupauksistaan huolimatta OpenSSL (0.9.6g) ei osaa/halua/viitsi/tms
> käyttää tuota /etc/egd-pool:ia vaikka oman FAQ:nsa mukaan näin pitäisi
> tapahtua.

FAQ kertoo meille tällaista:

On systems without /dev/urandom and /dev/random, it is a good idea
to use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage
for details.  Starting with version 0.9.7, OpenSSL will
automatically look for an EGD socket at /var/run/egd-pool,
/dev/egd-pool, /etc/egd-pool and
/etc/entropy.

Most components of the openssl command line utility automatically
try to seed the random number generator from a file.  The name of
the default seeding file is determined as follows: If environment
variable RANDFILE is set, then it names the seeding file.  Otherwise
if environment variable HOME is set, then the seeding file is
$HOME/.rnd. If neither RANDFILE nor HOME is set, versions up to
OpenSSL 0.9.6 will use file .rnd in the current directory while
OpenSSL 0.9.6a uses no default seeding file at all.  OpenSSL 0.9.6b
and later will behave similarly to 0.9.6a, but will use a default of
"C:\" for HOME on Windows systems if the environment variable has
not been set.

If the default seeding file does not exist or is too short, the
"PRNG not seeded" error message may occur.

The openssl command line utility will write back a new state to the
default seeding file (and create this file if necessary) unless
there was no sufficient seeding.

Pointing $RANDFILE to an Entropy Gathering Daemon socket does not
work. Use the "-rand" option of the OpenSSL command line tools
instead. The $RANDFILE environment variable and $HOME/.rnd are only
used by the OpenSSL command line tools. Applications using the
OpenSSL library provide their own configuration options to specify
the entropy source, please check out the documentation coming the
with application.

Tästä voimme siis päätellä, että OpenSSL 0.9.6 ei osaa
oletusarvoisesti etsiä /etc/egd-poolia eikä tajua sitä oikein
muutenkaan. Ratkaisu tähän on antaa komentorivityökaluille
lisäparametriksi -rand /etc/egd-pool. OpenSSL:ää käyttävissä
sovelluksissa se on sitten sovelluksen ongelma kertoa APIn läpi
jotenkin että pitää jutella UNIX socketille ja hakea sieltä
satunnaisuutta. Odotelkaamme siis OpenSSL 0.9.7:aa (Ihanaa,
liimatukat, ihanaa! Siinä on beta, mikset jo käännä...).

Pikaisen testailun perusteella fantan links osaa https:ää kun sanoo
ensin "export RANFILE=/etc/egd-pool". Voisiko joku selittää tosin,
että miksi links ei ainakaan https:n kanssa osaa http basic authia?

-- 
-=[ Count Zero / TBH - Jussi Hämäläinen - email count@theblah.org ]=-