[fedor] prefer stronger hash algorithms. Fixes #7541
This commit is contained in:
parent
722429a347
commit
24d38e2434
|
@ -170,14 +170,14 @@ class ConnectionJingle(object):
|
||||||
|
|
||||||
def __hash_support(self, contact):
|
def __hash_support(self, contact):
|
||||||
if contact.supports(nbxmpp.NS_HASHES):
|
if contact.supports(nbxmpp.NS_HASHES):
|
||||||
if contact.supports(nbxmpp.NS_HASHES_MD5):
|
if contact.supports(nbxmpp.NS_HASHES_SHA512):
|
||||||
return 'md5'
|
return 'sha-512'
|
||||||
elif contact.supports(nbxmpp.NS_HASHES_SHA1):
|
|
||||||
return 'sha-1'
|
|
||||||
elif contact.supports(nbxmpp.NS_HASHES_SHA256):
|
elif contact.supports(nbxmpp.NS_HASHES_SHA256):
|
||||||
return 'sha-256'
|
return 'sha-256'
|
||||||
elif contact.supports(nbxmpp.NS_HASHES_SHA512):
|
elif contact.supports(nbxmpp.NS_HASHES_SHA1):
|
||||||
return 'sha-512'
|
return 'sha-1'
|
||||||
|
elif contact.supports(nbxmpp.NS_HASHES_MD5):
|
||||||
|
return 'md5'
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def iter_jingle_sessions(self, jid, sid=None, media=None):
|
def iter_jingle_sessions(self, jid, sid=None, media=None):
|
||||||
|
|
Loading…
Reference in New Issue