Message196494
SSLSocket documentation mentions shutdown as analogue to socket.shutdown. However, instead of forbidding communication, it removes SSL wrapper from socket. For example, the following script doesn't work and returns garbage:
import socket
import ssl
s = socket.socket()
s.connect(('google.com', 443))
client = ssl.wrap_socket(s)
client.sendall(b'GET / HTTP/1.0\nConnection: close\n\n')
client.shutdown(socket.SHUT_WR)
print(repr(client.recv(40)))
Attached patch makes shutdown raise exception if how != SHUT_RDWR, as closing one side of socket over SSL doesn't make sense (unless I'm missing something). |
|
Date |
User |
Action |
Args |
2013-08-29 21:36:58 | zielmicha | set | recipients:
+ zielmicha |
2013-08-29 21:36:58 | zielmicha | set | messageid: <1377812218.52.0.68669263864.issue18880@psf.upfronthosting.co.za> |
2013-08-29 21:36:58 | zielmicha | link | issue18880 messages |
2013-08-29 21:36:58 | zielmicha | create | |
|