Comment 6 for bug 334570

Revision history for this message
rick_dean (rick-fdd) wrote :

I added support for OpenSSL.rand.Error. I also silenced some
benign C compiler warnings. The changes have been pushed to
lp:~rick-fdd/pyopenssl/rand_bytes2

Unfortunately, I am unable to raise one of these errors, so my
testing is somewhat incomplete. They don't seem to happen
when the entropy pool is depleted, or when the pool is
unseeded. Fortunately, the exception code is very similar to
SSL and crypto.

It seems a little unfortunate that our base error for each is
simply named "Error". If someone does a
"from OpenSSL.rand import *" they might clobber another
in their local namespace, but I suppose they asked for it, and
it's a bad practice anyway. It's painfully too late to change
the name now.

In a separate patch, I would like to convert the three
exception_from_error_queue() macros to an single function.
It should be defined in util.c next to error_queue_to_list(), and
receive the exception object as an arg.