DELETE_KEY for stub

NIIBE Yutaka gniibe at fsij.org
Wed Mar 16 04:00:16 CET 2016


Hello,

I saw posts to gnupg-users who want to move key from a card to
another.  Perhaps, it would not be common use cases, but it should be
supported.

Currently, gpg --delete-secret-key is not supported for stub.  For
gpg-agent, DELETE_KEY is not supported for stub.

For the latter, I think that it should be supported.  Are there any
reasons to inhibit this?  I mean, is it OK to apply following patch?


diff --git a/agent/findkey.c b/agent/findkey.c
index c5e7ae7..3cf8d0c 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -1311,7 +1311,7 @@ agent_delete_key (ctrl_t ctrl, const char *desc_text,
       break;

     case PRIVATE_KEY_SHADOWED:
-      err = gpg_error (GPG_ERR_KEY_ON_CARD);
+      err = remove_key_file (grip);
       break;

     default:
-- 



More information about the Gnupg-devel mailing list