- More accurate description of None outcome of _check_fingerprint

- Check for presence of PyOpenSSL in fingerprint check. Fixes #2841.
This commit is contained in:
junglecow 2006-12-27 23:28:47 +00:00
parent cf291c3c2f
commit 8707d511c1
1 changed files with 6 additions and 2 deletions

View File

@ -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')