Michael Vetter
7be6158c80
Set C99 standard in configure
...
We already use uint_32 from stdint.h which AFAIK is C99.
I seem to remember there is more C99 in the code. Let's explicitly
define it here.
Also fixes build for https://github.com/boothj5/profanity/pull/1053
2019-04-12 12:18:51 +02:00
Michael Vetter
61df0c8e85
Merge pull request #1039 from paulfariello/feature/omemo
...
Add basic OMEMO support.
2019-04-11 10:58:22 +02:00
Paul Fariello
f75e1d7a7b
Support contact name in /omemo fingerprint command
2019-04-10 17:24:56 +02:00
Paul Fariello
ad21021ce7
Fix issue with first encrypted message
...
When decrypting first message with prekey, libsignal wants to remove
used prekey from storage. Return value on success should be 0.
We used to return number of deleted keys. Thus libsignal was considering
we failed to remove the key and we were ignoring plaintext.
2019-04-10 17:24:56 +02:00
Paul Fariello
df648ba959
Try to start sessions with every jid in roster
2019-04-10 17:24:56 +02:00
Paul Fariello
f9b2fdc7db
OMEMO should be written uppercase
2019-04-10 17:24:56 +02:00
Paul Fariello
381d85bcca
Fix build on travis
2019-04-10 17:24:56 +02:00
Paul Fariello
277e8dc901
Add /omemo char command
2019-04-10 17:24:56 +02:00
Paul Fariello
0bc660400b
Automatically starts OMEMO if one identity is trusted
2019-04-10 17:24:56 +02:00
Paul Fariello
25eb138d0b
Rework trusted fingerprint storage
...
Stop using "jid:device_id" keys. And move long term storage to its own
file: trust.txt.
2019-04-10 17:23:46 +02:00
Paul Fariello
4ad6904216
Wait for discovery end to publish omemo devicelist and bundle
...
Add sv_ev_connection_features_received for that purpose
2019-04-10 17:23:46 +02:00
Paul Fariello
edbc15fa2b
Don't build OMEMO by default
2019-04-10 17:23:46 +02:00
Paul Fariello
01e96769c2
Prefix static function with _
2019-04-10 17:23:46 +02:00
Paul Fariello
0f4dd61776
Ensure pre keys are generated if missing from long term storage
2019-04-10 17:23:46 +02:00
Paul Fariello
e69f947547
Rework MUC reflected message filtering
...
Reflected messages can't be filtered by nick only otherwise you might
ignore messages comming from you on another devices.
Consequently we maintain a list of sent messages id in mucwin.
To be sure the id will be correctly reflected we use the origin-id
stanza.
2019-04-10 17:23:46 +02:00
Paul Fariello
e7be3a605b
Add OMEMO in prefs command
2019-04-10 17:23:46 +02:00
Paul Fariello
65b3f82c5f
Fix devicelist notification handler
...
devicelist handler should be kept after trigger
2019-04-10 17:23:46 +02:00
Paul Fariello
898302243e
Add clear_device_list command
2019-04-10 17:23:46 +02:00
Paul Fariello
5cd2b8dc9d
Permanently store pre keys
2019-04-10 17:23:46 +02:00
Paul Fariello
0d0e2b246a
Add support for missing from in bundle iq
2019-04-10 17:23:45 +02:00
Paul Fariello
562302846a
Handle bundle publication error on publish-options
...
We try to reconfigure node and publish again.
If it fails again then we give up.
2019-04-10 17:23:45 +02:00
Paul Fariello
904528b490
Ensure signal context is built on connection
...
We can't keep it between two connection because signal context is
specific to a given account.
2019-04-10 17:23:45 +02:00
Paul Fariello
075d4cf35b
Don't use glib 2.58 func
2019-04-10 17:23:45 +02:00
Paul Fariello
2015ba201d
Ensure encrypted carbon of own message are marked as encrypted
2019-04-10 17:23:45 +02:00
Paul Fariello
daf84ced0c
Add required OMEMO stub for unit-test
2019-04-10 17:23:45 +02:00
Paul Fariello
4a1c3c8c1e
Show all device fingerprint for current account
2019-04-10 17:12:31 +02:00
Paul Fariello
ba9679a706
Print fingerprint after trust and untrust command
2019-04-10 17:12:31 +02:00
Paul Fariello
bc16ba1669
Temporarly disable check for publish-options support
2019-04-10 17:12:31 +02:00
Paul Fariello
678bff9169
Add fingerprint autocompletion
2019-04-10 17:12:31 +02:00
Paul Fariello
3d8f47a724
Use /omemo fingerprint to show contact fingerprints
...
Don't print fingerprints when they are received
2019-04-10 17:12:31 +02:00
Paul Fariello
2fd2ca208c
Use connection_support to check for publish-options support
2019-04-10 17:12:31 +02:00
Paul Fariello
306706bd2e
Add OMEMO log command
2019-04-10 17:12:31 +02:00
Paul Fariello
dadd0c0590
Add missing preferences for OMEMO logs
2019-04-10 17:12:31 +02:00
Paul Fariello
91ee289c77
Add support for disconnect in OMEMO
2019-04-10 17:12:31 +02:00
Paul Fariello
bc541cb8ac
Add OMEMO end command
2019-04-10 17:12:31 +02:00
Paul Fariello
9a66e74986
Handle absent muc member
2019-04-10 17:12:31 +02:00
Paul Fariello
70109953ec
Revert "Ensure room isn't anonymous"
...
This reverts commit 733e1a24c7e08dde6aa2c15ec4528220aa360845.
2019-04-10 17:12:31 +02:00
Paul Fariello
d8f0bcef94
Add publish option to OMEMO device list and bundle
2019-04-10 17:12:31 +02:00
Paul Fariello
9044e3732c
Ensure room isn't anonymous
2019-04-10 17:12:31 +02:00
Paul Fariello
e5b01ed71b
Add OMEMO state in titlebar in MUC
2019-04-10 17:12:31 +02:00
Paul Fariello
88670a7f0b
Add OMEMO state in titlebar
2019-04-10 17:12:31 +02:00
Paul Fariello
4e1ffa6bdb
Log and print outgoing encrypted message
2019-04-10 17:12:31 +02:00
Paul Fariello
a9d55dec92
Add support for sending encrypted message in MUC
2019-04-10 17:12:31 +02:00
Paul Fariello
f7ce1607f9
Ensure saved_account is set before calling sv_ev_login_account_success
2019-04-10 17:12:31 +02:00
Paul Fariello
031e906035
Cosmetics rename variable barejid into roomjid
2019-04-10 17:12:31 +02:00
Paul Fariello
cf528383bd
Allow to start OMEMO in MUC
2019-04-10 17:12:31 +02:00
Paul Fariello
21f247d0eb
Handle window type MUC in OMEMO start command
2019-04-10 17:12:31 +02:00
Paul Fariello
a3897abba1
Add MUC message decryption
2019-04-10 17:12:31 +02:00
Paul Fariello
33b0b46420
Fix prekey handling after first use
...
libsignal will remove prekey on its own.
2019-04-10 17:12:31 +02:00
Paul Fariello
319fb856e0
Handle decrypted OMEMO messages as such
2019-04-10 17:12:31 +02:00