- g10/gpg.c (cmd_and_opt_values): Add command for delete-secret-subkeys.
(opts): Add delete-secret-subkeys argparse option.
(main): Parse and invoke the delete-secret-subkeys command.
- g10/main.h (delete_keys): Add subkeys_only parameter.
- g10/delkey.c (delete_keys): Likewise.
(should_skip): Skip primary keys if subkeys_only is true.
The new delete-secret-subkeys command is a safer variant of the existing
delete-secret-keys command. It skips primary keys during the deletion
process, preventing accidental deletion of the user's primary key
even if an exact key description for the primary key is provided.
Signed-off-by: Matheus Afonso Martins Moreira <firstname.lastname@example.org>