Lines Matching refs:ssl
23 import ssl
48 _default_protocol = ssl.PROTOCOL_SSLv23 if _has_ssl_context else \
49 ssl.PROTOCOL_TLSv1
53 self._context = ssl.SSLContext(ssl_version)
54 if self._context.protocol == ssl.PROTOCOL_SSLv23:
55 self._context.options |= ssl.OP_NO_SSLv2
56 self._context.options |= ssl.OP_NO_SSLv3
64 return self._context.verify_mode != ssl.CERT_NONE
66 return self.cert_reqs != ssl.CERT_NONE
140 self.cert_reqs = ssl_opts.pop('cert_reqs', ssl.CERT_REQUIRED)
200 return ssl.wrap_socket(sock, **ssl_opts)
260 kwargs['cert_reqs'] = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE
273 except (ssl.SSLError, socket.error, OSError):
282 return self.cert_reqs != ssl.CERT_NONE
288 self.cert_reqs = ssl.CERT_REQUIRED if value else ssl.CERT_NONE
351 kwargs['cert_reqs'] = ssl.CERT_NONE
383 except (ssl.SSLError, socket.error, OSError):