[issue18747] Re-seed OpenSSL's PRNG after fork

STINNER Victor report at bugs.python.org
Wed Aug 21 14:08:35 CEST 2013


STINNER Victor added the comment:

3.52 +#if 0
    3.53 +    fprintf(stderr, "PySSL_RAND_atfork_child() seeds %i
bytes in pid %i\n",
    3.54 +            (int)sizeof(seed), seed.pid);
    3.55 +#endif

Don't you want to remove this debug code?

     1.8 +    def test_random_fork(self):
     1.9 +        status = ssl.RAND_status()
    1.10 +        if not status:
    1.11 +            self.fail("OpenSSL's PRNG has insufficient randomness")

The test uses ssl.RAND_pseudo_bytes(), the check on ssl.RAND_status()
must be removed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18747>
_______________________________________


More information about the Python-bugs-list mailing list