Lines Matching refs:ssl
14 import ssl
16 ssl = None
257 if ssl is not None:
262 """An asyncore.dispatcher subclass supporting TLS/SSL."""
268 self.socket = ssl.wrap_socket(self.socket, suppress_ragged_eofs=False,
271 ssl_version=ssl.PROTOCOL_SSLv23)
277 except ssl.SSLError, err:
278 if err.args[0] in (ssl.SSL_ERROR_WANT_READ,
279 ssl.SSL_ERROR_WANT_WRITE):
281 elif err.args[0] == ssl.SSL_ERROR_EOF:
294 except ssl.SSLError, err:
295 if err.args[0] in (ssl.SSL_ERROR_WANT_READ,
296 ssl.SSL_ERROR_WANT_WRITE):
326 except ssl.SSLError, err:
327 if err.args[0] in (ssl.SSL_ERROR_EOF, ssl.SSL_ERROR_ZERO_RETURN,
328 ssl.SSL_ERROR_WANT_READ,
329 ssl.SSL_ERROR_WANT_WRITE):
336 except ssl.SSLError, err:
337 if err.args[0] in (ssl.SSL_ERROR_WANT_READ,
338 ssl.SSL_ERROR_WANT_WRITE):
340 if err.args[0] in (ssl.SSL_ERROR_EOF, ssl.SSL_ERROR_ZERO_RETURN):
349 if (isinstance(self.socket, ssl.SSLSocket) and
355 """A DummyDTPHandler subclass supporting TLS/SSL."""
364 """A DummyFTPHandler subclass supporting TLS/SSL."""
379 For TLS/SSL the only valid value for the parameter is '0'.
619 self.assertNotIsInstance(self.client.sock, ssl.SSLSocket)
621 self.assertIsInstance(self.client.sock, ssl.SSLSocket)
626 self.assertNotIsInstance(sock, ssl.SSLSocket)
633 self.assertIsInstance(sock, ssl.SSLSocket)
640 self.assertNotIsInstance(sock, ssl.SSLSocket)
646 self.assertNotIsInstance(self.client.sock, ssl.SSLSocket)
648 self.assertIsInstance(self.client.sock, ssl.SSLSocket)
658 self.client.ssl_version = ssl.PROTOCOL_SSLv3
662 self.client.ssl_version = ssl.PROTOCOL_TLSv1
767 if ssl is not None: