More prompts before key deletion
Open, LowPublic


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:

matheusmoreira created this object in space S1 Public.
werner triaged this task as Low priority.May 28 2019, 6:12 PM
matheusmoreira changed Version from 2.2.15 to 2.2.16.Jun 5 2019, 11:53 AM
werner closed this task as Wontfix.Jun 5 2019, 6:18 PM
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.

matheusmoreira added a comment.EditedJun 6 2019, 3:20 AM

@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.
matheusmoreira reopened this task as Open.Jun 6 2019, 3:58 AM

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)