status code for gpgme_op_delete

Daiki Ueno ueno at gnu.org
Fri Dec 4 10:45:06 CET 2015


Daiki Ueno <ueno at gnu.org> writes:

> When trying to delete a key from GPGME, I am asked through Pinentry:
>
>   Do you really want to permanently delete the OpenPGP secret key ...?
>
> If I answer "No" to this, gpgme_op_delete does not return any error,
> since there is no status output for this case.  Maybe DELETE_PROBLEM
> could be extended or a new status code could be added?

For what it's worth, I'm attaching a patch for GnuPG and its counterpart
for GPGME.  With the patch, gpg emits an ERROR status line with
"delete_key.secret" error source (the name is taken from the cpr prompt
on the above line in the code).

I'm currently working on Seahorse visual refresh[1] in GNOME, and to
provide a responsive UI, I want this and the --gen-key cancellation
issue to be fixed.

Footnotes: 
[1]  https://github.com/ueno/gnome-credentials

Thanks,
-- 
Daiki Ueno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gpg-Write-ERROR-status-on-delete-key-cancellation.patch
Type: text/x-patch
Size: 1008 bytes
Desc: not available
URL: </pipermail/attachments/20151204/def4ae84/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Return-on-user-cancellation-of-delete-operation.patch
Type: text/x-patch
Size: 1637 bytes
Desc: not available
URL: </pipermail/attachments/20151204/def4ae84/attachment-0001.bin>


More information about the Gnupg-devel mailing list