comparison sat/core/sat_main.py @ 3237:b0c57c9a4bd8

plugin XEP-0384: OMEMO trust policy: OMEMO trust policy can now be specified. For now there are 2 policies: - `manual`: each new device fingerprint must be explicitly trusted or not before the device can be used, and the message sent - `BTBV` (Blind Trust Before Verification): each new device fingerprint is automically trusted, until user manually trust or not a device, in which case the behaviour becomes the same as for `manual` for the entity. When using the Trust UI, user can put the entity back to blind trust if they wish. A message is send as feedback to user when a new device is/must be trusted, trying to explain clearly what's happening to the user. Devices which have been automically trusted are marked, so user can know which ones may cause security issue.
author Goffi <goffi@goffi.org>
date Fri, 27 Mar 2020 10:02:14 +0100
parents 2f406b762788
children 6cf4bd6972c2
comparison
equal deleted inserted replaced
3236:9477f3197981 3237:b0c57c9a4bd8
880 return data_format.serialise(ret) 880 return data_format.serialise(ret)
881 881
882 def _encryptionTrustUIGet(self, to_jid_s, namespace, profile_key): 882 def _encryptionTrustUIGet(self, to_jid_s, namespace, profile_key):
883 client = self.getClient(profile_key) 883 client = self.getClient(profile_key)
884 to_jid = jid.JID(to_jid_s) 884 to_jid = jid.JID(to_jid_s)
885 d = client.encryption.getTrustUI(to_jid, namespace=namespace or None) 885 d = defer.ensureDeferred(
886 client.encryption.getTrustUI(to_jid, namespace=namespace or None))
886 d.addCallback(lambda xmlui: xmlui.toXml()) 887 d.addCallback(lambda xmlui: xmlui.toXml())
887 return d 888 return d
888 889
889 ## XMPP methods ## 890 ## XMPP methods ##
890 891