Conversation
722e3e6 to
5be3918
Compare
032442a to
0e45663
Compare
d810ee5 to
e0744da
Compare
0e45663 to
d5fd33c
Compare
79a7943 to
895db47
Compare
895db47 to
48a715b
Compare
a3deffe to
37e02ee
Compare
527561e to
fa350fb
Compare
1b13ddd to
5554654
Compare
5554654 to
9260fd5
Compare
cbb16fa to
458ba69
Compare
Hocuri
left a comment
There was a problem hiding this comment.
FTR this PR does not add an "unpublished" flag to a transport. But this can also come in a later PR.
| old_certificate: SignedPublicKey, | ||
| new_certificate: SignedPublicKey, | ||
| ) -> Result<SignedPublicKey> { | ||
| old_certificate |
There was a problem hiding this comment.
The old certificate can expire so this will fail and we should just return the new one if key imprints are the same i guess
There was a problem hiding this comment.
Certificate or the primary key cannot expire by itself, at least in OpenPGP, since V4. Direct key signature (or primary User ID signature if there is no direct key signature) of the primary key or subkey my have "key expiration time" subpacket that tells when the key/subkey expires, we currently ignore it. For encryption subkeys we want to use expiration eventually for forward secrecy, but for this PR i have not looked at encryption subkeys at all. For primary key expiration we will likely have to ignore it, saying that the contact has expired or telling the user that their profile has expired does not make much sense and if we do it now this will break profiles of the users who have in the past imported the keys with 1 year or 5 year expiration time and forgot about it.
Even if we have old certificate with expired primary key and new certificate with renewed primary key, this is just a number from the primary key signature. It does not tell you anything about encryption subkeys. E.g. you may have a contact with an encryption subkey and expired primary key. Someone may gossip you a certificate for this contact with a renewed primary key (newer DKS with extended expiration time) but no encryption subkeys - this does not mean you should now drop all encryption subkeys and accept new certificate without subkeys as a whole without merging.
29f69c4 to
2a669e8
Compare
2a669e8 to
cf0d7ce
Compare
bf7ddc5 to
c88cf85
Compare
This way the order does not change when primary address is changed.
…in the current member branch
We put all relay addresses as a notation subpacket in the direct key signature to distribute the relay addresses.
c88cf85 to
e6e1d02
Compare

This change adds information about all relay addresses to the public key and sends messages to all addresses listed in the public key contains the list of relays.
Public key is re-generated on the fly to include Direct Key Signature with Notation Data subpacket. Notation name is
relays@chatmail.atand the value is a comma-separated list of addresses. We send all relays, but only use the first 3 now. Last seen "From" address is remembered for contacts and is used in theToheader, as a fallback when relay list is not in the public key etc., but is not used as the recipient if it is not included in the notation subpacket as well. This will allow us to send from addresses that we don't want to receive messages to in the future if we decide to do so, e.g. send from a classic email server but receive chat messages only on chatmail relays.There is a known problem that removing a transport does not restart I/O, so you receive messages on the removed transport and it creates ad hoc group as you don't recognize your own address in the
Tofield. Fixing the problem is not for this PR, we probably want to restart i/o and also recognize that the message is a 1:1 message for us just by the intended recipient fingerprint even if there is an unrecognized address in theTofield.Closes #7865
TODO: