Commit graph libervia-backend/sat/plugins/plugin_sec_aesgcm.py
Author SHA1 Message Date
Goffi
8d64157d88 core: fix calls to domish.Element.elements:
domish.Element.elements should be called with namespace and element name as 2 arguments,
but it has been confused in several places with the call to `domish.Element.addElement`
which is often done with a `(namespace, name)` tuple. Unfortunately calling with a tuple
is accepted and doesn't raise any error in `elements`, but this result in a wrong element
returned.

This patch fixes the erroneous calls.
2022-07-20 17:12:29 +02:00
Goffi
dc86957043 date update 2021-03-19 15:45:14 +01:00
Goffi
cdf468a7c1 plugin aesgcm: wait for each splitted message to be sent before sending next one 2020-03-22 14:01:47 +01:00
Goffi
06516eeb1d plugin attach, aesgcm: attachments refactoring:
attachment handling has been simplified, and now use a "register" method similar as the
ones used for download or upload.
A default method (for unencrypted messages) will try a simple upload and will copy the
links to body.

AESGCM plugin has been adapted to be used for encrypted files. If more than one file is
sent with AESGCM plugin, they will be split in several messages as current de-facto
standard (OMEMO media sharing) doesn't support several files per message.
2020-03-18 20:25:02 +01:00
Goffi
1883dbd3ab plugin download, aesgcm: disable TLS check if check_certificate setting is disabled 2020-03-06 18:19:03 +01:00
Goffi
7924b601ab core (constants): renamed MESS_KEY_MEDIA_TYPE to MESS_KEY_ATTACHMENTS_MEDIA_TYPE 2020-02-29 16:55:22 +01:00
Goffi
c16dd25fc9 plugin download, aesgcm: fixed handling of HTTP errors 2020-02-26 15:54:43 +01:00
Goffi
74a60a2e5b plugin aesgcm: use 12 bytes Initialisation Vector:
SàT was using 16 bytes IV when sending files withr AES-GCM, due to ChatSecure being only
compatible with that. Monal, an other iOS client is only compatible with 12 bytes IV, and
ChatSecure has fixed its code to also handle 12 bytes IV, so there is not reason anymore
to use 16 bytes, and SàT now uses 12 bytes.
2020-02-18 18:17:18 +01:00
Goffi
5538b52f25 plugin aesgcm: look for "aesgcm" links in body to use them as attachments 2020-02-18 18:17:18 +01:00
Goffi
a39349fe64 dates update 2020-01-29 09:50:54 +01:00
Goffi
f9a034509c plugin sec aesgcm: new plugin handling aesgcm: scheme for e2e encrypted media sharing:
The scheme is register with download meta plugin, and it is activated with HTTP Upload
(XEP-0363) when `encryption` is used in `options` with the value of C.ENC_AES_GCM.
This is also known as `OMEMO Media Sharing` even if this method is not directly linked to
OMEMO and can be used independently.
2019-12-20 12:28:04 +01:00