From 8707d511c13f6fe0853a8da30581f6054873c170 Mon Sep 17 00:00:00 2001 From: junglecow Date: Wed, 27 Dec 2006 23:28:47 +0000 Subject: [PATCH] - More accurate description of None outcome of _check_fingerprint - Check for presence of PyOpenSSL in fingerprint check. Fixes #2841. --- src/common/connection.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index faaddf0aa..7cb6b6b64 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -448,7 +448,7 @@ class Connection(ConnectionHandlers): return if fpr_good == None: - log.warning(_("No fingerprint in database for %s. Connection could be insecure."), hostname) + log.warning(_("Unable to check fingerprint for %s. Connection could be insecure."), hostname) if fpr_good == True: log.info("Fingerprint found and matched for %s.", hostname) @@ -458,7 +458,11 @@ class Connection(ConnectionHandlers): return True def _check_fingerprint(self, con, con_type): - fpr_good = None # None: No fpr in database, False: mismatch, True: match + fpr_good = None # None: Unable to check fpr, False: mismatch, True: match + + # FIXME: not tidy + import common.xmpp.transports_nb + if not common.xmpp.transports_nb.USE_PYOPENSSL: return None # FIXME: find a more permanent place for loading servers.xml servers_xml = os.path.join(gajim.DATA_DIR, 'other', 'servers.xml')