diff options
author | Stephan Mueller <smueller@chronox.de> | 2019-02-19 08:14:41 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-09-06 17:12:38 +0200 |
commit | e825aea2ba3529c333d7ec2c76e63998cb83d999 (patch) | |
tree | b4f8392f45f824950ed950c2b5c17dd2e73a34c6 /g10/keydb.h | |
parent | gpg: Make --quiet work on --send-keys. (diff) | |
download | gnupg2-e825aea2ba3529c333d7ec2c76e63998cb83d999.tar.xz gnupg2-e825aea2ba3529c333d7ec2c76e63998cb83d999.zip |
gpg: expand GPG groups when resolving a key
* g10/expand-group.c: New
* g10/pkclist.c: Extract expand_group and expand_id into expand-group.c.
* g10/keydb.h: Add prototypes of expand_id and expand_group.
* g10/getkey.c: Use expand_group before resolving key references.
* g10/Makefile.am: Compile expand-group.c.
--
When searching a key by its name, try to expand the provided name in
case it is a GPG group reference. This GPG group resolution is performed
before the individual keys are verified.
This allows key listing using a GPG group reference. In particular, this
modification fixes the encryption to group support in KDE's Kmail which
is broken since version 18.04.
Signed-off-by: Stephan Mueller <stephan.mueller@atsec.com>
- Changed new filename to use a dash instead of an underscore.
- Indendation changes.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keydb.h')
-rw-r--r-- | g10/keydb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/keydb.h b/g10/keydb.h index 72ba98d04..6fbc432fd 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -261,6 +261,8 @@ void show_revocation_reason (ctrl_t ctrl, PKT_public_key *pk, int mode ); int check_signatures_trust (ctrl_t ctrl, PKT_signature *sig); void release_pk_list (PK_LIST pk_list); +int expand_id (const char *id, strlist_t *into, unsigned int flags); +strlist_t expand_group (strlist_t input); int build_pk_list (ctrl_t ctrl, strlist_t rcpts, PK_LIST *ret_pk_list); gpg_error_t find_and_check_key (ctrl_t ctrl, const char *name, unsigned int use, |