Add extra check for the cert in the expiration handler.

This commit is contained in:
Lance Stout 2012-06-09 10:53:58 -07:00
parent 8567d6034f
commit 6cfb5cb14c

View file

@ -835,6 +835,10 @@ class XMLStream(object):
if not self.use_tls and not self.use_ssl: if not self.use_tls and not self.use_ssl:
return return
if not self._der_cert:
log.warn("TLS or SSL was enabled, but no certificate was found.")
return
def restart(): def restart():
if not self.event_handled('ssl_expired_cert'): if not self.event_handled('ssl_expired_cert'):
log.warn("The server certificate has expired. Restarting.") log.warn("The server certificate has expired. Restarting.")