PySocks icon indicating copy to clipboard operation
PySocks copied to clipboard

HTTPS: No Server Certificate Verification

Open wonkodv opened this issue 7 years ago • 1 comments

Compared to http.client.HTTPSClient, SocksiPyConnectionS misses the following in its connect method:

        if not self._context.check_hostname and self._check_hostname:
            try:
                ssl.match_hostname(self.sock.getpeercert(), server_hostname)
            except Exception:
                self.sock.shutdown(socket.SHUT_RDWR)
                self.sock.close()
                raise

wonkodv avatar Jan 23 '18 19:01 wonkodv

Thanks. Would you be willing to submit a pull request?

Anorov avatar Jan 31 '18 19:01 Anorov