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.
This commit is contained in:
Goffi 2020-03-27 10:02:14 +01:00
commit cabaa16279

View file

@ -882,7 +882,8 @@ class SAT(service.Service):
def _encryptionTrustUIGet(self, to_jid_s, namespace, profile_key):
client = self.getClient(profile_key)
to_jid = jid.JID(to_jid_s)
d = client.encryption.getTrustUI(to_jid, namespace=namespace or None)
d = defer.ensureDeferred(
client.encryption.getTrustUI(to_jid, namespace=namespace or None))
d.addCallback(lambda xmlui: xmlui.toXml())
return d