Message138754
| Author |
joeshaw |
| Recipients |
joeshaw |
| Date |
2011年06月20日.19:59:41 |
| SpamBayes Score |
0.0024957918 |
| Marked as misclassified |
No |
| Message-id |
<1308599982.47.0.566216705326.issue12378@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
From some experimentation, closing the underlying socket isn't enough. You also need to close the SSL socket, so you'd need to do something like:
new_socket = socket.create_connection((host, port), timeout)
ssl_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile, do_handshake_on_connect=False)
try:
ssl_socket.do_handshake()
except:
ssl_socket.close()
new_socket.close()
raise
self.file = SSLFakeFile(ssl_socket)
return ssl_socket |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年06月20日 19:59:42 | joeshaw | set | recipients:
+ joeshaw |
| 2011年06月20日 19:59:42 | joeshaw | set | messageid: <1308599982.47.0.566216705326.issue12378@psf.upfronthosting.co.za> |
| 2011年06月20日 19:59:41 | joeshaw | link | issue12378 messages |
| 2011年06月20日 19:59:41 | joeshaw | create |
|