This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients christian.heimes, neologix, pitrou, sbt, vstinner
Date 2013-08-18.21:20:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwZ7jBHH=f_R+sPsrmgb-4t3txCZSzrqddN-iwLgE+=G0A@mail.gmail.com>
In-reply-to <1376832122.61.0.259675418608.issue18747@psf.upfronthosting.co.za>
Content
PySSL_RAND_atfork_child(void) can be simplified by calling
_PyTime_gettimeofday(). This function uses the most(*) accurate
function and already implements fallbacks on error.

(*) _PyTime_gettimeofday() does not use clock_gettime() because of a
linker issue: Python is not linked to librt, which is required to get
clock_gettime() on Linux with glibc < 2.17. So you get a few less bits
of entropy, but does it really matter? If it matters, you have
probably to use a better random of entropy than the system time...

Anyway, it would be easier to move the _PyTime_timeval and similar
structures into the seed structure instead of shifting bits.
History
Date User Action Args
2013-08-18 21:20:37vstinnersetrecipients: + vstinner, pitrou, christian.heimes, neologix, sbt
2013-08-18 21:20:37vstinnerlinkissue18747 messages
2013-08-18 21:20:37vstinnercreate