mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Allow unattended deletion of secret keys.
* agent/command.c (cmd_delete_key): Make the --force option depend on --disallow-loopback-passphrase. * g10/call-agent.c (agent_delete_key): Add arg FORCE. * g10/delkey.c (do_delete_key): Pass opt.answer_yes to agent_delete_key. -- Unless the agent has been configured with --disallow-loopback-passpharse an unattended deletion of a secret key is now possible with gpg by using --batch _and_ --yes. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
693838f012
commit
ac9ff644b1
6 changed files with 45 additions and 10 deletions
|
@ -337,6 +337,10 @@ internal cache of @command{gpg-agent} with passphrases.
|
|||
Disallow or allow clients to use the loopback pinentry features; see
|
||||
the option @option{pinentry-mode} for details. Allow is the default.
|
||||
|
||||
The @option{--force} option of the Assuan command @command{DELETE_KEY}
|
||||
is also controlled by this option: The option is ignored if a loopback
|
||||
pinentry is disallowed.
|
||||
|
||||
@item --no-allow-external-cache
|
||||
@opindex no-allow-external-cache
|
||||
Tell Pinentry not to enable features which use an external cache for
|
||||
|
@ -820,8 +824,17 @@ fi
|
|||
@section Agent's Assuan Protocol
|
||||
|
||||
Note: this section does only document the protocol, which is used by
|
||||
GnuPG components; it does not deal with the ssh-agent protocol.
|
||||
GnuPG components; it does not deal with the ssh-agent protocol. To
|
||||
see the full specification of each command, use
|
||||
|
||||
@example
|
||||
gpg-connect-agent 'help COMMAND' /bye
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
or just 'help' to list all available commands.
|
||||
|
||||
@noindent
|
||||
The @command{gpg-agent} daemon is started on demand by the GnuPG
|
||||
components.
|
||||
|
||||
|
|
11
doc/gpg.texi
11
doc/gpg.texi
|
@ -376,13 +376,20 @@ safeguard against accidental deletion of multiple keys.
|
|||
|
||||
@item --delete-secret-keys @code{name}
|
||||
@opindex delete-secret-keys
|
||||
Remove key from the secret keyring. In batch mode the key
|
||||
must be specified by fingerprint.
|
||||
gRemove key from the secret keyring. In batch mode the key must be
|
||||
specified by fingerprint. The option @option{--yes} can be used to
|
||||
advice gpg-agent not to request a confirmation. This extra
|
||||
pre-caution is done because @command{gpg} can't be sure that the
|
||||
secret key (as controlled by gpg-agent) is only used for the given
|
||||
OpenPGP public key.
|
||||
|
||||
|
||||
@item --delete-secret-and-public-key @code{name}
|
||||
@opindex delete-secret-and-public-key
|
||||
Same as @option{--delete-key}, but if a secret key exists, it will be
|
||||
removed first. In batch mode the key must be specified by fingerprint.
|
||||
The option @option{--yes} can be used to advice gpg-agent not to
|
||||
request a confirmation.
|
||||
|
||||
@item --export
|
||||
@opindex export
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue