Ah.
The problem is that the patched _ssl module mentioned in stacklesslib is code 
that is proprietory to CCP :)
I did this to allow one to wrap a python object, not just a socket, so that the 
_ssl module would call python callbacks for the actual data transfer, rather 
than attempt doing its own socket communications.
This would allow you to put any actual transport mechanism in place.

I could make this part of the 2.x stackless distro.

in 3.x, I think , they already use openssl, which is more low level and allows 
you to drive the ssl thingie yourself.  But I haven't looked.


From: [email protected] [mailto:[email protected]] 
On Behalf Of Adam Turk
Sent: 23. október 2012 14:47
To: [email protected]
Subject: [Stackless] SocketBio and the mysterious sslwrap

List,

2.7.2 Stackless 3.1b3 060516 (default, Oct 22 2012, 11:45:30) [GCC 4.5.2]
Stacklesslib Unreleased version  (1.0.4?)
SleekXMPP 1.1.10
OpenSSL 0.9.8

I'm working on a project that requires SleekXMPP to run under Stackless. Sleek 
likes to make use of SSL and TLS, and everything seems good until Sleek calls 
do_handshake() on the SSLSocket and a call way down the C stack returns Errno 9 
Bad file descriptor. The problem is that SSL will return this if there's a cert 
trust problem, but I don't think that's the whole issue. It's possibly related 
to the fact that I wasn't able to use SocketBio, using a proxy object instead 
to get the _socket.socket inheritance that _ssl.sslwrap seems to require. 
There's a note in the comments for patch_ssl() that mentions a modifed _ssl 
module that can wrap any object, not just _socket.socket, but I found no other 
reference. Sleek without Stackless and monkeypatching works flawlessly. Has 
anyone had similar issues using Stackless with SSL? Possibly even with Sleek?

-Adam
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to