STINNER Victor <victor.stin...@gmail.com> added the comment:

-        if (RAND_pseudo_bytes((unsigned char*)
+        if (RAND_bytes((unsigned char*)

This is not a good idea: RAND_bytes() is blocking, whereas os.urandom() doesn't 
block on other platforms. os.urandom() is similar to /dev/urandom (non 
blocking), whereas /dev/random is blocking. With this patch, Python may block 
at startup if there is not enough entropy.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9123>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to