From: Dave A. <da...@im...> - 2002-10-06 19:35:34
|
Does a tsafe connection not support this? -dave Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.2/threading.py", line 408, in __bootstrap self.run() File "./spkproxy.py", line 700, in run self.connection.startSSLserver() File "./spkproxy.py", line 98, in startSSLserver self.mysocket.set_accept_state() AttributeError: Connection instance has no attribute 'set_accept_state' On Sun, 2002-10-06 at 14:22, Martin Sj=F6gren wrote: > s=F6n 2002-10-06 klockan 19.28 skrev Dave Aitel: > > On Sun, 2002-10-06 at 06:46, Martin Sj=F6gren wrote: > >=20 > > > If you're running multithreaded, you'd do well to use > > > OpenSSL.tsafe.Connection instead of OpenSSL.SSL.Connection (tsafe sta= nds > > > for thread safe :)) > >=20 > > hmm. How does one do this exactly? > > -dave > >=20 > >=20 > > self.mysocket =3D OpenSSL.tsafe.Connection(ctx, self.mysocket) > > self.mysocket =3D OpenSSL.tsafe.Connection(ctx, self.mysocket) > > AttributeError: 'module' object has no attribute 'tsafe' >=20 > D'oh! I must have forgotten to import tsafe from the __init__.py file. > If you do import OpenSSL.tsafe, or from OpenSSL import tsafe, it works. >=20 >=20 > /Martin |