Manage public keys, over Stalwart's x:PublicKey registry
A new Settings section, next to Identities & signatures: list, add, rename and remove the OpenPGP public keys and S/MIME certificates published on this account. Only public material -- no private key is stored, requested or sent by any of this. This is PR #67 revived. That branch was built against 0.16.19, closed unmerged on 2026-08-26, and shares no ancestry with main after the email scrub, so it is ported rather than rebased: the four files it added are carried over, the three it edited are applied by hand, and everything it claimed was re-probed against the live 0.16.20 on 2026-09-05. The i18n work is new -- nine catalogues landed on 2026-08-31, after that branch was written. What the re-probe confirmed, unchanged from 0.16.19: - An ordinary user may read *and* write their own keys, though the permissions table lists every sysPublicKey* permission as administrative. get and query both answered for a normal account, and a malformed create came back invalidProperties naming `key` rather than forbidden -- a rejection of the key, not of the person. - The server parses the key and says precisely what is wrong. So ihasmail does not validate key material; the server's message is shown verbatim, as password-policy rejections already are. - urn:stalwart:jmap is still absent from the session's top-level capabilities and present per-account, so the check that reads all three places is still the one that works. What it added, none of which was known before: - A key can parse perfectly and still be refused, with different words: a sign-and-certify key with no encryption subkey -- what `gpg --quick-generate-key` produces -- gets "Could not find any suitable keys in OpenPGP public key". That is the rejection somebody exporting from GnuPG will actually meet, and it is not a paste error, so collapsing both to "invalid key" would send them back to the clipboard for a problem that is in the key. - emailAddresses comes back as {} when empty -- an object where a JMAP list property should be an array. It type-checks, then throws in join() while the list renders. normalize() checked the shape already; there is now a test saying why, and the mock answers {} the same way, because one that helpfully returned [] would let that crash ship. - A create answers with the id alone, no createdAt, so adding a key reloads rather than believing the response. - destroy works and leaves the registry empty. PR #67 shipped that path untested -- its live probe was refused before anything was created, so there was nothing to destroy. - Patching `key` is allowed by the server. The mock still refuses it, now deliberately rather than for want of evidence: ihasmail replaces a key by adding one and removing the old, which keeps createdAt meaning what it says. x:EncryptionAtRest still does not exist on 0.16.20 -- asking for it is an unknownMethod. encryptionAtRest is a field on x:AccountSettings, and its value is a typed object ({"@type":"Disabled"}) rather than the bare string ROADMAP described. Nothing here writes it. An empty description is now sent as empty rather than filled in with "Key". The description is stored on the server, so a default invented in the client would be whichever language the adder happened to be using; the list labels a blank one at render time instead. Verified in a browser against the mock, not only in tests: both rejections reach the toast in the server's own words with the form still filled in, a good key renders its card, the kind is labelled from the armour header, renaming persists, removing asks first and empties the list, and the whole section reads correctly in German.
This commit is contained in:
@@ -1331,6 +1331,36 @@ export const catalog: Catalog = {
|
||||
"Empty “{name}”?": "„{name}“ leeren?",
|
||||
"Delete them": "Alle löschen",
|
||||
"Nothing was deleted": "Es wurde nichts gelöscht",
|
||||
// ── Encryption keys, over Stalwart's x:PublicKey registry (#67) ──
|
||||
"Encryption keys": "Verschlüsselungsschlüssel",
|
||||
"Not available on this server": "Auf diesem Server nicht verfügbar",
|
||||
"Public keys are kept in Stalwart's registry, which this server does not offer. ihasmail needs Stalwart 0.16 or newer for it.": "Öffentliche Schlüssel liegen in der Registry von Stalwart, die dieser Server nicht anbietet. ihasmail benötigt dafür Stalwart 0.16 oder neuer.",
|
||||
"Public keys for this account — what other people encrypt to, and what a signature is checked against. These are public by nature: no private key is stored, requested, or sent by ihasmail.": "Öffentliche Schlüssel für dieses Konto — das, woran andere verschlüsseln und woran eine Signatur geprüft wird. Sie sind naturgemäß öffentlich: ihasmail speichert, erfragt und sendet keinen privaten Schlüssel.",
|
||||
"No keys yet": "Noch keine Schlüssel",
|
||||
"Add an OpenPGP public key or an S/MIME certificate to publish it on this account.": "Fügen Sie einen öffentlichen OpenPGP-Schlüssel oder ein S/MIME-Zertifikat hinzu, um es für dieses Konto zu veröffentlichen.",
|
||||
"Key added": "Schlüssel hinzugefügt",
|
||||
"Key removed": "Schlüssel entfernt",
|
||||
"Remove “{name}”?": "„{name}“ entfernen?",
|
||||
"this key": "diesen Schlüssel",
|
||||
"Anyone holding it can still use it — removing it here only stops this account offering it.": "Wer ihn besitzt, kann ihn weiterhin verwenden — das Entfernen hier bewirkt nur, dass dieses Konto ihn nicht mehr anbietet.",
|
||||
"Remove key": "Schlüssel entfernen",
|
||||
"Key description": "Schlüsselbeschreibung",
|
||||
"Untitled key": "Unbenannter Schlüssel",
|
||||
"Click to rename": "Zum Umbenennen klicken",
|
||||
"Expired": "Abgelaufen",
|
||||
"Added": "Hinzugefügt",
|
||||
"Addresses": "Adressen",
|
||||
"No expiry set": "Kein Ablaufdatum festgelegt",
|
||||
"Any address on this account": "Jede Adresse dieses Kontos",
|
||||
"cryptography\u0004Key": "Schlüssel",
|
||||
"Public key": "Öffentlicher Schlüssel",
|
||||
"Work key": "Arbeitsschlüssel",
|
||||
"Paste the whole armoured block, headers included. The server checks it and says what is wrong if it cannot read it.": "Fügen Sie den gesamten ASCII-Block samt Kopfzeilen ein. Der Server prüft ihn und sagt, was nicht stimmt, falls er ihn nicht lesen kann.",
|
||||
"Add key": "Schlüssel hinzufügen",
|
||||
"Add a key": "Einen Schlüssel hinzufügen",
|
||||
"Stalwart stores these keys, and this release does no more than manage them: ihasmail does not yet sign, encrypt, decrypt or verify anything with them. Adding one does not by itself start encrypting your mail.": "Stalwart speichert diese Schlüssel, und diese Version verwaltet sie lediglich: ihasmail signiert, verschlüsselt, entschlüsselt und prüft damit noch nichts. Einen hinzuzufügen beginnt nicht von selbst, Ihre E-Mails zu verschlüsseln.",
|
||||
"Unrecognised": "Nicht erkannt",
|
||||
"No account to add a key to.": "Kein Konto vorhanden, zu dem ein Schlüssel hinzugefügt werden könnte.",
|
||||
},
|
||||
plurals: {
|
||||
// ── Third pass ─────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user