[pycrypto] Run test suite with /dev/random

Dwayne Litzenberger dlitz at dlitz.net
Sat Apr 21 13:26:21 EDT 2012


On 03/02/12 11:35 AM, Sebastian Ramacher wrote:
> On 01/31/2012 05:45 AM, Dwayne C. Litzenberger wrote:
>> Ok, I'm willing to accept a patch that implements your workaround, if you can
>> address a few remaining issues:
> 
> Please have a look at the attached patch. It should fix all the remaining
> issues. Just let me know if there is something left that I've missed.
> 
>> 1. BlockingIOError needs to be handled.  If the signal occurs immediately   
>> after the read(2) syscall is invoked, it will set errno=EAGAIN and    Python
>> will raise BlockingIOError.  (At least, that's what the    documentation says.)
> 
> I think you meant IOError and errno=EINTR. FileIO won't throw a BlockingIOError
> in any case. That's BufferedReader. If FileIO.read fails and errno=EAGAIN then
> it returns None and otherwise it throws an IOError. At least that's how I
> understand the code and the documentation.

OK.  I've merged this, and it'll be available in PyCrypto v2.6, which
I'll be releasing this weekend.

https://github.com/dlitz/pycrypto/commit/95d65366e9ac7e194bf8317d69785c9a5b877790

Cheers,
- Dwayne


More information about the pycrypto mailing list