summaryrefslogtreecommitdiff
path: root/poezio/plugin_e2ee.py
AgeCommit message (Collapse)Author
2022-08-21mypy: Type some more thingsEmmanuel Gil Peyrot
This lets us pass under mypy 0.971, and is yet another step towards mypyc compatibility perhaps.
2022-07-11plugin_e2ee: pass on 'own key' information to pluginMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-07-04plugin_e2ee: ignore incorrect mypy errorMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-07-03plugin_e2ee: fingerprint command defaults to ownjid in MucTabMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-07-03plugin_e2ee: log JID when no FPs can be foundMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-31Change license for (some previous and) future revisions to GPL-3.0-or-laterMaxime “pep” Buquet
From this revision on, all changes that were under the following authors' names are also under GPL-3.0-or-later, and not just future changes: - Maxime Buquet (or Maxime “pep” Buquet) Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-23chattab: add e2e_encryption propertyMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-21plugin_e2ee: Allow /<name>_fingerprint in RosterInfoTab without argumentMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-21plugin_e2ee: rework fingerprint display slightlyMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-21plugin_e2ee: new format_fingerprint method to be overriden by pluginMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-21plugin_e2ee: get_fingerprint is now asyncMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-17plugins/b64: specify supported_tab_types; Fix type in plugin_e2eeMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-17plugin_e2ee: Ensure supported_tab_types is specified in pluginMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: _decrypt_wrapper doesn't need a return typeMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: Ensure all encrypted messages we handle are processedMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: Use f-stringMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: Add TODO in _encrypt filterMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: quit _encrypt filter as soon as we seen encrypted tagsMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: allow normal message to pass through again when not encryptingMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: check all encrypted tags in _decrypt and _encryptMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: drop message if tab is None and doesn't contain encrypted tagMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-16plugin_e2ee: let already encrypted messages throughMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-01plugin_e2ee: ignore mypy failures with passthrough metaclass paramMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-01plugin_e2ee: encrypt: also search tabs for barejids if not foundMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-01plugin_e2ee: don't fail on tab.jid if tab is NoneMaxime “pep” Buquet
I doubt this is the proper fix, there are still paths that use tab below that. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-01plugin_e2ee: allow decrypt call to be asyncMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-01fix: do not traceback on encrypted payloads without a tab openmathieui
2021-08-07plugin_e2ee: handle empty args in /foo_state commandsMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-17plugin_e2ee: correctly pass realjid to decrypt call in MUCMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-04-02fix: tons of type errorsmathieui
2021-04-02refactor: rewrite config.get() to getbool, getstr, getint…mathieui
2020-12-12from __future__ import annotationsEmmanuel Gil Peyrot
Now that our baseline is Python 3.7, we can rely on type annotations to be lazily evaluated.
2020-01-11plugin_e2ee: Remove debug logging of encrypted messagesMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-11plugin_e2ee: prevent empty JID from being passed to pluginMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-01E2EE MUC supportMaxime “pep” Buquet
This change transmits the original JID of the sender (in decrypt) or receiver(s) (in encrypt). Handling of MUC is not complete. It is possible that some participants have access to realjids while others don't (e.g., moderators in semi-anon MUCs). The code currently doesn't handle this and this will cause at least two issues: - Sending an encrypted message in a semi-anon MUC would reveal the sender's identity (public key) - Recipients wouldn't be able to decrypt this message as they don't have access to the sender's realjid. Unless they already have the bundle available and then they could associate the public key with a jid (another privacy issue/defeating the point of semi-anon rooms). TODO: Fix this ^ Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-31Allow encryption in normal messagesMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-31E2EEPlugin: Mute some lint warnings because of metaclassMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-30Add TODO in plugin_e2ee _decryptMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-28Disable a pylint error on a line (due to __getattr__ override)mathieui
2019-12-27omemo: remove unnecessary newline in docstringMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27omemo: prevent traceback when no JID is specified in non-supported tabMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27omemo: use dedicated method to check if encryption is enabledMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27omemo: use jid property instead of name on chat tabMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27omemo: fix show_fingerprints (JID instead of str)mathieui
2019-12-27omemo: add an api in plugin_e2ee to get the fingerprint(s) of a jidmathieui
2019-12-27omemo: fix an indent error and make mypy happymathieui
2019-12-27omemo: fix some errors / feedback in trust settingmathieui
2019-12-27omemo: fix the type of the supported tab tyoesmathieui
2019-12-27omemo: add supported_tab_types and trust_states plugin attributesmathieui
- supported tab types is a list of tabs this plugin should be active in (only chattabs) - trust_states is a dict[str → set] containing only two keys: accepted and rejected, whose values are the internal plugin states that should allow encryption and the ones that should not
2019-12-27omemo: add a wrapper around _encrypt() to handle user feedbackmathieui
(yes, another one)