summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-09 10:53:58 -0700
committerLance Stout <lancestout@gmail.com>2012-06-09 11:05:18 -0700
commit0b51afe87abf882fd74d18fe231458e33c949dd5 (patch)
tree5b54f221da931ced34bb7abe3abcdcfc5bdc429c /sleekxmpp
parent2b298766c91b5f8c36783be93ad54c228a8dd6ba (diff)
downloadslixmpp-0b51afe87abf882fd74d18fe231458e33c949dd5.tar.gz
slixmpp-0b51afe87abf882fd74d18fe231458e33c949dd5.tar.bz2
slixmpp-0b51afe87abf882fd74d18fe231458e33c949dd5.tar.xz
slixmpp-0b51afe87abf882fd74d18fe231458e33c949dd5.zip
Add extra check for the cert in the expiration handler.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 8575c65b..6dfd5498 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -835,6 +835,10 @@ class XMLStream(object):
if not self.use_tls and not self.use_ssl:
return
+ if not self._der_cert:
+ log.warn("TLS or SSL was enabled, but no certificate was found.")
+ return
+
def restart():
if not self.event_handled('ssl_expired_cert'):
log.warn("The server certificate has expired. Restarting.")