From f49311ef9ee76c2e4cce402e377867eff308aca0 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 22 May 2012 03:56:06 -0700 Subject: Add better certificate handling. Certificate host names are now matched (using DNS, SRV, XMPPAddr, and Common Name), along with expiration check. Scheduled event to reset the stream once the server's cert expires. Handle invalid cert trust chains gracefully now. --- sleekxmpp/componentxmpp.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index df23c2f6..348a08e0 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -101,6 +101,9 @@ class ComponentXMPP(BaseXMPP): host = self.server_host if port is None: port = self.server_port + + self.server_name = self.boundjid.host + log.debug("Connecting to %s:%s", host, port) return XMLStream.connect(self, host=host, port=port, use_ssl=use_ssl, -- cgit v1.2.3