Synchronise hashes support with XEP-0300 in Jingle
This commit is contained in:
parent
0d3ce37b27
commit
2b9f9f3bb9
|
@ -173,14 +173,18 @@ class ConnectionJingle(object):
|
|||
|
||||
def __hash_support(self, contact):
|
||||
if contact.supports(nbxmpp.NS_HASHES):
|
||||
if contact.supports(nbxmpp.NS_HASHES_SHA512):
|
||||
if contact.supports(nbxmpp.NS_HASHES_BLAKE2B_512):
|
||||
return 'blake2b-512'
|
||||
elif contact.supports(nbxmpp.NS_HASHES_BLAKE2B_256):
|
||||
return 'blake2b-256'
|
||||
elif contact.supports(nbxmpp.NS_HASHES_SHA3_512):
|
||||
return 'sha3-512'
|
||||
elif contact.supports(nbxmpp.NS_HASHES_SHA3_256):
|
||||
return 'sha3-256'
|
||||
elif 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_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):
|
||||
|
|
Loading…
Reference in New Issue