Mercurial > libervia-backend
diff 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 |
line wrap: on
line diff
--- a/sat/core/sat_main.py Fri Mar 27 09:55:16 2020 +0100 +++ b/sat/core/sat_main.py Fri Mar 27 10:02:14 2020 +0100 @@ -882,7 +882,8 @@ 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