summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-02-17 04:27:03 +0100
committermathieui <mathieui@mathieui.net>2015-02-17 04:27:03 +0100
commitffb2e05f2157e2888d6c2377556d21b749172386 (patch)
tree0d909ee6ee2e3e06ae04d47bcc9ee70a08a6d930
parent1e2665df19a866d5676abec566b9d8f190ecdc80 (diff)
downloadslixmpp-ffb2e05f2157e2888d6c2377556d21b749172386.tar.gz
slixmpp-ffb2e05f2157e2888d6c2377556d21b749172386.tar.bz2
slixmpp-ffb2e05f2157e2888d6c2377556d21b749172386.tar.xz
slixmpp-ffb2e05f2157e2888d6c2377556d21b749172386.zip
Check that ciphers have been initialized
(if not, python will use the system default)
-rw-r--r--slixmpp/xmlstream/xmlstream.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index f7e166c1..2e109792 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -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)