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:
@@ -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."""
|
||||
|
Reference in New Issue
Block a user