ssl error "PRNG not seeded"

Geoffrey Talvola gtalvola at nameconnector.com
Thu Apr 10 17:13:26 CEST 2003


I have a Python program that uses SSL to make https requests every few
minutes.  The program happens to be a Windows NT Service.  I have multiple
machines running this service and they have been working fine for months.
Overall, there have been hundreds of restarts of the service without
problems.

Yesterday, one of these machines was rebooted.  When my service started, it
couldn't make any SSL requests.  My logfile reveals that every time it tried
to call socket.ssl(sock) the following exception was raised:

sslerror: (1, 'error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG
not seeded')

Once I stopped and started the service, everything was fine.

My question is, why would this program work fine through hundreds of runs,
then just this one time flake out and claim that the PRNG wasn't seeded?  (I
hate intermittent problems like this!)  Could it have anything to do with
the fact that the machine was rebooted?

Is this likely to be a problem in the Python SSL implementation or an
OpenSSL problem?

Details:

Python 2.2.1
_socket.pyd compiled with OpenSSL 0.9.7 using VC++ 6.0


- Geoff





More information about the Python-list mailing list