Check that ciphers have been initialized

(if not, python will use the system default)
This commit is contained in:
mathieui 2015-02-17 04:27:03 +01:00
parent 1e2665df19
commit ffb2e05f21
No known key found for this signature in database
GPG Key ID: C59F84CEEFD616E3

View File

@ -473,7 +473,8 @@ class XMLStream(asyncio.BaseProtocol):
loop = asyncio.get_event_loop()
self.event_when_connected = "tls_success"
self.ssl_context.set_ciphers(self.ciphers)
if self.ciphers is not None:
self.ssl_context.set_ciphers(self.ciphers)
if self.keyfile and self.certfile:
try:
self.ssl_context.load_cert_chain(self.certfile, self.keyfile)