summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
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:01:45 -0700
commit6cfb5cb14c2904a36ea350046dfcabd1773613f7 (patch)
treeb1af431b95bc00df472deff23fc25d58b753f949 /sleekxmpp/xmlstream
parent8567d6034f9668e68a15f7166c1df6999e646477 (diff)
downloadslixmpp-6cfb5cb14c2904a36ea350046dfcabd1773613f7.tar.gz
slixmpp-6cfb5cb14c2904a36ea350046dfcabd1773613f7.tar.bz2
slixmpp-6cfb5cb14c2904a36ea350046dfcabd1773613f7.tar.xz
slixmpp-6cfb5cb14c2904a36ea350046dfcabd1773613f7.zip
Add extra check for the cert in the expiration handler.
Diffstat (limited to 'sleekxmpp/xmlstream')
-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.")