Bugfix issue #104: an SSL unwrap() sends data, and so it needs trampolining.

Be warned that I do not quite understand what makes certain SSL operations
"gross" (in the terminology of ssl.py's comments) and require the methods to
be copied wholesale into the GreenSSLSocket; but simply adding the trampoline
like this works for me!
This commit is contained in:
Brandon Craig Rhodes
2011-11-02 20:27:14 -04:00
parent f1bed7d9f9
commit e12bb0bc4e

View File

@@ -185,7 +185,8 @@ class GreenSSLSocket(__ssl.SSLSocket):
return super(GreenSSLSocket, self).recvfrom_into(buffer, nbytes, flags)
def unwrap(self):
return GreenSocket(super(GreenSSLSocket, self).unwrap())
return GreenSocket(self._call_trampolining(
super(GreenSSLSocket, self).unwrap))
def do_handshake(self):
"""Perform a TLS/SSL handshake."""