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.
This commit is contained in:
Werner Koch 2023-05-30 11:20:34 +02:00
parent 36a68bc530
commit fbc3963d62
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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))
{