From fbc3963d6229853fe9fb1fd599ef39ed0fe2eae6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 30 May 2023 11:20:34 +0200 Subject: [PATCH] core: For key signing and uid revoking allow an empty user id. * src/engine-gpg.c (gpg_keysign): Required USERID to be non-empty. -- For some language bindings it is easier if the engine considers an empty user id to be equivalent to NULL. --- src/engine-gpg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 93db6115..75e375d7 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -3445,7 +3445,7 @@ gpg_keysign (void *engine, gpgme_key_t key, const char *userid, if (!err) err = add_arg (gpg, key->fpr); - if (!err && userid) + if (!err && userid && *userid) { if ((flags & GPGME_KEYSIGN_LFSEP)) { @@ -3491,7 +3491,7 @@ gpg_revsig (void *engine, gpgme_key_t key, gpgme_key_t signing_key, if (!err) err = add_arg (gpg, signing_key->fpr); - if (!err && userid) + if (!err && userid && *userid) { if ((flags & GPGME_REVSIG_LFSEP)) {