From: Tobias O. <tob...@ta...> - 2011-11-25 17:13:24
|
> > However, > > > > PKey.generate_key > > > > still seems to block everything. > > > > Does above function lock the GIL? > > Other way round. The GIL is held unless you explicitly release it, which the > current source code for that function does not seem to: > > http://bazaar.launchpad.net/~exarkun/pyopenssl/trunk/view/head:/OpenS > SL/crypto/pkey.c#L39 > > So AFAICT yes, it will block forever. > > Perhaps you could shell out to "openssl rsa" in a subprocess. Not ideal, but it > won't require source code changes. Thanks for clarifying. Unfortunately, I am also missing other stuff (like dump pub key from cert to verify that cert imported actually is for a given priv key). So I checked out M2Crypto. It seems to release the GIL during key generation .. The API is ... creative. IOW: it sucks. But I guess thats because it's a SWIG generated OpenSSL wrapper. Anyway .. will move to M2Crypto. |