[RFC] Add group support to key management commands

Stephan Mueller smueller at chronox.de
Fri Dec 21 12:39:25 CET 2018


I am using KDE's kmail and rely heavily on the GPG group feature to encrypt 
emails to groups. The GPG support in kmail seems to have changed recently such 
that group support seems to be non-functional at this point.

After strace'ing kmail a bit, I found that the following command is executed 
to search for the recipient key.

gpg2 --batch --no-sk-comments --charset utf8 --enable-progress-filter --exit-
on-status-write-error --with-colons --list-keys -- <RECIPIENT>

When the recipient is a GPG group, this command is empty.

May I ask whether it is considered appropriate to add group support to this 
mechanism so that when recipient is a group, the command returns all members?

The attached patch would do that (note, the patch is for discussion - it does 
not link at the moment, because pkclist.c is not in libcommon.a. But if you 
manually copy the functions from pkclist.c to getkey.c, you see that the patch 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: expand_groups_list_keys.diff
Type: text/x-patch
Size: 2860 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20181221/0d5357c0/attachment.bin>

More information about the Gnupg-devel mailing list