feat: support underscore-prefixed domains with self-signed TLS certificates#7926
Open
hpk42 wants to merge 33 commits intolink2xt/rustls-underscorefrom
Open
feat: support underscore-prefixed domains with self-signed TLS certificates#7926hpk42 wants to merge 33 commits intolink2xt/rustls-underscorefrom
hpk42 wants to merge 33 commits intolink2xt/rustls-underscorefrom
Conversation
link2xt
reviewed
Mar 1, 2026
link2xt
reviewed
Mar 2, 2026
d9623a6 to
0f8a349
Compare
…tes the contact (#7883) fix #7880 depends on #7754 (merged) With this change, a securejoin message is just ignored if the contact was deleted in the meantime; apparently the user is not interested in the securejoin process anymore if they deleted the contact. But other, parallel securejoin processes must not be affected; the test also tests this.
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/main/CHANGELOG.md) - [Commits](proptest-rs/proptest@v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: proptest dependency-version: 1.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
I assume that the problem was that sometimes, alice2 or fiona doesn't accept alice's smeared timestamp, because `calc_sort_timestamp()` doesn't allow the timestamp of a received message to be in the future. I tried this patch: ```diff diff --cc src/chat.rs index 9565437,9565437cf..a2e4f97d0 --- a/src/chat.rs +++ b/src/chat.rs @@@ -46,6 -46,6 +46,7 @@@ use crate::receive_imf::ReceivedMsg use crate::smtp::{self, send_msg_to_smtp}; use crate::stock_str; use crate::sync::{self, Sync::*, SyncData}; ++use crate::timesmearing::MAX_SECONDS_TO_LEND_FROM_FUTURE; use crate::tools::{ IsNoneOrEmpty, SystemTime, buf_compress, create_broadcast_secret, create_id, create_outgoing_rfc724_mid, create_smeared_timestamp, create_smeared_timestamps, get_abs_path, @@@ -1212,7 -1212,7 +1213,11 @@@ SELECT id, rfc724_mid, pre_rfc724_mid, received: bool, incoming: bool, ) -> Result<i64> { -- let mut sort_timestamp = cmp::min(message_timestamp, smeared_time(context)); ++ let mut sort_timestamp = cmp::min( ++ message_timestamp, ++ // Add MAX_SECONDS_TO_LEND_FROM_FUTURE in order to allow other senders to do timesmearing, too: ++ smeared_time(context) + MAX_SECONDS_TO_LEND_FROM_FUTURE, ++ ); let last_msg_time: Option<i64> = if always_sort_to_bottom { // get newest message for this chat ``` ...maybe this patch makes sense anyways, but you still get the problem that the message sent by alice2 (i.e. the add-fiona message) will have an earlier timestamp than the message sent by alice, because alice already sent more messages, and therefore has more timesmearing-seconds. It's unsure it makes sense to modify calc_sort_timestamp() this way because if some chat member has the clock in the future (even unintentionally), their fresh messages will be sorted to the bottom relatively to others' fresh messages. Maybe it's even better to limit the message timestamp ("Date") by the current system time there. To really fix the problem, we could send a serial number together with the timestamp, that distinguishes two messages sent in the same second. But since we haven't gotten complaints about message ordering since some time, let's just leave things as they are. Since all this timesmearing is a bit best-effort right now, I decided to instead just make the test more relaxed.
…nces headers for prefetch_should_download (#7932) Don't depend on these 3 cleartext headers for the question whether we download a message. This PR will waste a bit of bandwidth for people who use the legacy show_emails option; apart from that, there is no user-visible change yet. It's a preparation for being able to remove these headers, in order to further reduce unencrypted metadata. Removing In-Reply-To and References will be easy; removing Chat-Version must happen at least one release after the PR here is released, so that people don't miss messages. Also, maybe some nerds depend on the Chat-Version header for server-side filtering of messages, but we shall have this discussion at some other time. For the question whether a message should be moved, we do still depend on them; this will be fixed with #7780. When both this PR and #7780 are merged, we can stop requesting Chat-Version header during prefetch.
Minimal change lets the desktop client select gif files placed in the stickers folders.
Implements property value escaping according to RFC6350 section 3.4. <https://www.rfc-editor.org/rfc/rfc6350.html#section-3.4> Fixes: #7893
Remove compatibility code needed for Core <= v1.143, Core 1.144 was released on 2024-09-21.
b0a66e5 to
cc74488
Compare
d31f931 to
e40d4fd
Compare
Don't use first-person form in placeholder texts, as these can be misleading when broadcasted to group. Additionally ensures that broadcasted system messages are not localized to not leak locally-set language to the group chat. Fixes #7930 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
With multiple transports there are multiple inbox loops on the same profile `Context`. They tend to start running housekeeping at the same time, e.g. when deleting a message with an attachment, and then `remove_unused_files()` tries to remove the same files that are already deleted by another thread and logs errors.
This change is mainly to avoid exposing the write lock outside the pool module. To avoid deadlocks, outside code should work only with the pooled connections and use no more than one connection per thread.
Documentation comment explains how it prevents the deadlock.
Bumps [strum](https://github.com/Peternator7/strum) from 0.27.2 to 0.28.0. - [Release notes](https://github.com/Peternator7/strum/releases) - [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md) - [Commits](Peternator7/strum@v0.27.2...v0.28.0) --- updated-dependencies: - dependency-name: strum dependency-version: 0.28.0 dependency-type: direct:production update-type: version-update:semver-minor ...
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.27.2 to 0.28.0. - [Release notes](https://github.com/Peternator7/strum/releases) - [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md) - [Commits](Peternator7/strum@v0.27.2...v0.28.0) --- updated-dependencies: - dependency-name: strum_macros dependency-version: 0.28.0 dependency-type: direct:production update-type: version-update:semver-minor ...
…icates Allow Delta Chat core to work with chatmail servers running on underscore-prefixed domains (e.g. _alice.localchat) which use self-signed TLS certificates. This is mirroring related work on chatmail relays: chatmail/relay#855 Underscore domains with self-signed TLS certs can be used by LXC test containers where obtaining real certificates is not practical. When the domain starts with '_', certificate verification is automatically relaxed for IMAP/SMTP connections, dcaccount QR code handling, and iroh relay endpoints. The Python test suite is adapted to also work against such underscore-domain servers, including cross-core tests with older Delta Chat versions. Note: this PR does not support HTTPS requests with underscore domains. They are not currently needed for working with LXC test containers. 14 files changed, +102/-31 lines (excluding Cargo.lock). Cargo.lock: +606/-11 lines from enabling iroh features needed for connecting to iroh relay endpoint on underscore domains. The added dependencies are unfortunate but best considered when finally upgrading to iroh 1.0 (tm).
…ead of AcceptInvalidCertificates Remove AcceptInvalidCertificates overrides in configure.rs and qr.rs that caused a fallback to OpenSSL/native-tls. The upstream Rustls TLS layer now handles underscore-prefixed domains via NoCertificateVerification directly. Also fix clippy lint in peer_channels.rs (map_or -> is_some_and).
and the webpki-root-certs needs the license admission
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow Delta Chat core to work with chatmail servers running on underscore-prefixed domains (e.g. _alice.example.org) which use self-signed TLS certificates. This is mirroring related work on chatmail relays: chatmail/relay#855 . Underscore domains with self-signed TLS certs can be used by LXC containers on local networks where obtaining real certificates is not practical.
When the domain starts with '_', certificate verification is automatically relaxed for IMAP/SMTP connections, dcaccount QR code handling, and iroh relay endpoints. The Python test suite is adapted to also work against such underscore-domain servers, including cross-core tests with older Delta Chat versions.
Note: this PR does not support HTTPS requests with underscore domains. They are not currently needed for working with LXC test containers, and introducing support would not only require some boilerplate with TLS connections but also a deeper look at how hyper performs http requests. It's best left for a separate consideration. This PR also does not make Iroh work with underscore domains. It would draw in dependencies and that is best considered in a separate PR.
Note2: i also fixed some resource loading in tests, because i ran into issues as i wasn't running tests from deltachat-rpc-client directory but repo root.