Changeset View
Changeset View
Standalone View
Standalone View
g10/delkey.c
Context not available. | |||||
* may also be used for other protocols and thus deleting it from the gpg | * may also be used for other protocols and thus deleting it from the gpg | ||||
* would also delete the key for other tools. */ | * would also delete the key for other tools. */ | ||||
if (!err) | if (!err) | ||||
err = agent_delete_key (NULL, hexgrip, prompt, opt.answer_yes); | { | ||||
if (!opt.dry_run) | |||||
err = agent_delete_key (NULL, hexgrip, prompt, opt.answer_yes); | |||||
} | |||||
xfree (prompt); | xfree (prompt); | ||||
xfree (hexgrip); | xfree (hexgrip); | ||||
Context not available. | |||||
{ | { | ||||
if (confirm_deletion (ctrl, node->pkt, secret, exactmatch)) | if (confirm_deletion (ctrl, node->pkt, secret, exactmatch)) | ||||
{ | { | ||||
err = keydb_delete_keyblock (hd); | if (!opt.dry_run) | ||||
err = keydb_delete_keyblock (hd); | |||||
if (err) | if (err) | ||||
{ | { | ||||
log_error (_("deleting keyblock failed: %s\n"), | log_error (_("deleting keyblock failed: %s\n"), | ||||
Context not available. | |||||
revalidation_mark(). This makes sense - only deleting keys | revalidation_mark(). This makes sense - only deleting keys | ||||
that have ownertrust set should trigger this. */ | that have ownertrust set should trigger this. */ | ||||
if (!secret && pk && clear_ownertrusts (ctrl, pk)) | if (!secret && pk) | ||||
{ | { | ||||
if (!opt.dry_run) | |||||
clear_ownertrusts (ctrl, pk); | |||||
if (opt.verbose) | if (opt.verbose) | ||||
log_info (_("ownertrust information cleared\n")); | log_info (_("ownertrust information cleared\n")); | ||||
} | } | ||||
Context not available. |