dino icon indicating copy to clipboard operation
dino copied to clipboard

OPENPGP PLUGIN: Don't list expired/revoked GPG keys

Open eerielili opened this issue 2 years ago • 1 comments

Hello, @fiaxh This PR should close #91.

Other features includes :

  • Blocks sending a PGP message when your key is revoked or expired: dino gpg revoked message image

  • Coloring and adding a label signaling if your already selected key is either revoked or expired: image image

Kind regards, lili

eerielili avatar Jan 20 '24 13:01 eerielili

Update: I did find a way. I'll need to modify the encryption_activated method in encryption_list_entry.vala. Working on it.

Edit: bingo! image

Edit 2: I splitted the message, so if it's revoked: image

or expired: image

It still doesn't trigger if the key expires or revokes while dino is in use, but switching the encryption methods back and forth to GPG do rerun the check for expiry / revocation status and block the field accordingly.

Edit 3: It does trigger by switching back and forth conversations, or clicking the conversation in the left pane.

eerielili avatar Apr 16 '24 06:04 eerielili

I did add a warning in the account panel if the current selected key has expired or is revoked: image

eerielili avatar Apr 21 '24 21:04 eerielili

It still doesn't trigger if the key expires or revokes while dino is in use

I finally managed to do that without needing to click on left pane or switching back and forth conversations. It involves calling method on_encryption_activated in send_text() method in main/src/ui/chat_input/chat_input_controller.vala if PGP is the encryption method, triggering the checks in the plugin.

Now, if you try to send a message but the key has expired or has been revoked while Dino is in use and you're in a chat, the input should be blocked with the following depending on your situation: image image

With this, I think all bases are covered.

@NicoHood @cjj20 Feel free to test and give feedback anytime

eerielili avatar Apr 26 '24 02:04 eerielili

@fiaxh Adapted for new UI: image

Edit: added some coloring image

eerielili avatar Jun 20 '24 19:06 eerielili