summaryrefslogtreecommitdiff
path: root/sleekxmpp/componentxmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-05-22 03:56:06 -0700
committerLance Stout <lancestout@gmail.com>2012-05-22 03:56:06 -0700
commitf49311ef9ee76c2e4cce402e377867eff308aca0 (patch)
tree50bb75037f13552d1c77ea23c1f46dcb69e7a3bf /sleekxmpp/componentxmpp.py
parent678e529efc0e6fff65133de6769a5596034d90c6 (diff)
downloadslixmpp-f49311ef9ee76c2e4cce402e377867eff308aca0.tar.gz
slixmpp-f49311ef9ee76c2e4cce402e377867eff308aca0.tar.bz2
slixmpp-f49311ef9ee76c2e4cce402e377867eff308aca0.tar.xz
slixmpp-f49311ef9ee76c2e4cce402e377867eff308aca0.zip
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.
Diffstat (limited to 'sleekxmpp/componentxmpp.py')
-rw-r--r--sleekxmpp/componentxmpp.py3
1 files changed, 3 insertions, 0 deletions
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,