Author: asterix Date: 2008-12-22 10:59:35 +0100 (Mon, 22 Dec 2008) New Revision: 10891
Modified: trunk/src/common/xmpp/client_nb.py Log: do'nt try starttls if stream version < 1.0. Fixes #4600
Modified: trunk/src/common/xmpp/client_nb.py =================================================================== --- trunk/src/common/xmpp/client_nb.py 2008-12-21 20:41:14 UTC (rev 10890) +++ trunk/src/common/xmpp/client_nb.py 2008-12-22 09:59:35 UTC (rev 10891) @@ -329,16 +329,16 @@ # if we want plain connection, we're done now self._on_connect() return + if self.incoming_stream_version() != '1.0': + # if stream version is less than 1.0, we can't do more + log.warn('While connecting with type = "tls": stream version is less than 1.0') + self._on_connect() + return if not self.Dispatcher.Stream.features.getTag('starttls'): # if server doesn't advertise TLS in init response, we can't do more log.warn('While connecting with type = "tls": TLS unsupported by remote server') self._on_connect() return - if self.incoming_stream_version() != '1.0': - # if stream version is less than 1.0, we can't do more - log.warn('While connecting with type = "tls": stream version is less than 1.0') - self._on_connect() - return # otherwise start TLS negotioation self.stream_started = False log.info("TLS supported by remote server. Requesting TLS start.")