Improve dc_get_contact_encrinfo()

Return error for special IDs. Previously "No encryption." was returned for DC_CONTACT_ID_SELF.

Show "No encryption." if peerstate is reset.

Never talk about transport encryption: it is misleading. Even if TLS is used for client IMAP and SMTP connections, MTA-MTA connection may be unencrypted if MX does not support STARTTLS.

Add a Rust test.
This commit is contained in:
link2xt
2021-02-01 05:37:59 +03:00
committed by link2xt
parent a34cfd56b4
commit fbec12393d
3 changed files with 66 additions and 29 deletions

View File

@@ -5120,9 +5120,7 @@ void dc_event_unref(dc_event_t* event);
/// Used to build the string returned by dc_get_contact_encrinfo().
#define DC_STR_E2E_AVAILABLE 25
/// "Transport-encryption."
///
/// Used to build the string returned by dc_get_contact_encrinfo().
/// DEPRECATED 2021-02-07
#define DC_STR_ENCR_TRANSP 27
/// "No encryption."