From eccd7f1c982409f7c1f507f86fd7c3937bdf75e9 Mon Sep 17 00:00:00 2001 From: Gasper Zejn Date: Fri, 12 Aug 2016 15:32:42 +0200 Subject: Provide domain name to loop.create_connection if using SSL. --- slixmpp/xmlstream/xmlstream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index f11a4a16..bd6c4e6f 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -302,7 +302,8 @@ class XMLStream(asyncio.BaseProtocol): yield from self.loop.create_connection(lambda: self, self.address[0], self.address[1], - ssl=self.use_ssl) + ssl=self.use_ssl, + server_hostname=self.default_domain if self.use_ssl else None) except Socket.gaierror as e: self.event('connection_failed', 'No DNS record available for %s' % self.default_domain) -- cgit v1.2.3