Page MenuHome GnuPG

More prompts before key deletion
Closed, WontfixPublic

Description

I added more confirmation prompts before deleting all keys and primary keys in particular.

  1. Factor out the secret key deletion code into a static function to facilitate future changes.
  2. Confirm the deletion of each individual key. Allows the user to delete keys interactively.
  3. Add another confirmation prompt for primary keys. Emphasizes to the user that a primary key will be deleted.

Here are the patches:

Details

Version
2.2.16

Event Timeline

werner claimed this task.
werner added a subscriber: werner.

In case I not already mentioned it: There won't be any new commands to delete a key. Of course you are free to change GnuPG as you like but I won't apply them here.

I am sorry for the extra work you did but nevertheless it emphasized the problem with the non-working bang syntax.

@werner Only patches 2 and 3 introduce new commands. What do you think about the other changes?

  1. Patch 1 places the bulk of the secret key deletion code in a static function. I think it makes the code easier to understand.
  2. Patch 4 adds prompts for each individual key. This allows the user to delete keys interactively.
  3. Patch 5 adds an extra prompt for primary keys. This emphasizes to the user that a primary key will be deleted.

Here are the patches without any new commands:

Would you be open to adding new options instead of new commands? I could make patches that add the --subkeys-only and --stubs-only options to the --delete[-secret]-keys commands.

matheusmoreira renamed this task from Key deletion: more prompts, new commands to More prompts before key deletion.Jun 6 2019, 5:39 AM
matheusmoreira updated the task description. (Show Details)
aheinecke added a subscriber: aheinecke.

I think we can close this as Wontfix since it is our opinion to wont fix this issue. If there should be more prevetion of accidents it would probably be better to have the user type in "DELETE" or "YES". Anything else then another click confirming a popup. Since this will just be clicked away through muscle memory. This came up again in T7211: Kleopatra: configuration option to prohibit deletion of certificate with secret key