From 6cfb5cb14c2904a36ea350046dfcabd1773613f7 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 9 Jun 2012 10:53:58 -0700 Subject: Add extra check for the cert in the expiration handler. --- sleekxmpp/xmlstream/xmlstream.py | 4 ++++ 1 file changed, 4 insertions(+) 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.") -- cgit v1.2.3