From 24d38e2434a7eaf1514a0e4b1a738bf6a6eacfa5 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 2 Nov 2013 21:22:41 +0100 Subject: [PATCH] [fedor] prefer stronger hash algorithms. Fixes #7541 --- src/common/jingle.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/jingle.py b/src/common/jingle.py index 412aa0940..5ff9f7bb4 100644 --- a/src/common/jingle.py +++ b/src/common/jingle.py @@ -170,14 +170,14 @@ class ConnectionJingle(object): def __hash_support(self, contact): if contact.supports(nbxmpp.NS_HASHES): - if contact.supports(nbxmpp.NS_HASHES_MD5): - return 'md5' - elif contact.supports(nbxmpp.NS_HASHES_SHA1): - return 'sha-1' + if contact.supports(nbxmpp.NS_HASHES_SHA512): + return 'sha-512' elif contact.supports(nbxmpp.NS_HASHES_SHA256): return 'sha-256' - elif contact.supports(nbxmpp.NS_HASHES_SHA512): - return 'sha-512' + elif contact.supports(nbxmpp.NS_HASHES_SHA1): + return 'sha-1' + elif contact.supports(nbxmpp.NS_HASHES_MD5): + return 'md5' return None def iter_jingle_sessions(self, jid, sid=None, media=None):