Skip to content

feat: import Autocrypt-Gossip keys without checking the addresses - #8638

Merged
link2xt merged 1 commit into
mainfrom
link2xt/autocrypt-gossip-import-no-checks
Sep 2, 2026
Merged

feat: import Autocrypt-Gossip keys without checking the addresses#8638
link2xt merged 1 commit into
mainfrom
link2xt/autocrypt-gossip-import-no-checks

Conversation

@link2xt

@link2xt link2xt commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

It is safe to import any keys into the keychain.
Keys can anyway be imported from vCards
and Autocrypt headers without any checks.

These checks are from the time before we had key-contacts and maintained Autocrypt peerstates table.

@link2xt
link2xt force-pushed the link2xt/autocrypt-gossip-import-no-checks branch 2 times, most recently from b75ee18 to 0092e25 Compare August 28, 2026 21:08
@link2xt

link2xt commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

This is from @Hocuri comment at #8620 (comment)

Comment thread src/mimeparser.rs
@@ -555,8 +555,7 @@ impl MimeMessage {
// but only if the mail was correctly signed. Probably it's ok to not require
// encryption here, but let's follow the standard.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably also drop this check.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autocrypt/gossip and securejoin will need a concerted revisit at some point, but i'd ask for caution now going for "refactors" when they drop checks in this area. Tests still passing after removing checks does not mean much, if the checks were never covered by tests.

@link2xt
link2xt marked this pull request as ready for review August 28, 2026 21:14

@hpk42 hpk42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is just a "refactor", when it's dropping checks in the autocrypt/securejoin handling which is known for intricacies. Existing tests keep passing, but the removed code was not actually tested so that doesn't say much.

@link2xt

link2xt commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator Author

First check was introduced in deltachat/deltachat-core@80a3cad in C core. The second check was introduced in a3fe105 (PR #3849) with the comment "Non-standard, but anyway we can't update the cached peerstate here." which was replaced in 416131b (large squashed key-contacts introduction commit) with "Non-standard, might not be necessary to have this check here".

@hpk42 hpk42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just sidenoting about "refactor" commit title, and that there is no test coverage. I am ok to merge this PR as is.

It is safe to import any keys into the keychain.
Keys can anyway be imported from vCards
and Autocrypt headers without any checks.

These checks are from the time before we had key-contacts
and maintained Autocrypt `peerstates` table.
@link2xt link2xt changed the title refactor: import Autocrypt-Gossip keys without checking the addresses feat: import Autocrypt-Gossip keys without checking the addresses Sep 2, 2026
@link2xt
link2xt force-pushed the link2xt/autocrypt-gossip-import-no-checks branch from 0092e25 to b287f7e Compare September 2, 2026 19:59
@link2xt
link2xt merged commit 38d6cf2 into main Sep 2, 2026
30 checks passed
@link2xt
link2xt deleted the link2xt/autocrypt-gossip-import-no-checks branch September 2, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants