1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

agent: Make sure to return success in ephemeral store mode.

* agent/genkey.c (store_key): Clear ERR on success.
--

This fixes a real problem which might let ephemeral store mode fail
randomly.

This is part of
GnuPG-bug-id: 7129
Co-authored-by: Jakub Jelen <jjelen@redhat.com>

(cherry picked from commit fdc5003956407da1984f40fc27115e4704587e15)
This commit is contained in:
Werner Koch 2024-05-28 16:37:25 +02:00
parent 0b52f83780
commit 19d93a239d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -116,6 +116,7 @@ store_key (ctrl_t ctrl, gcry_sexp_t private,
ek->keybuf = buf; ek->keybuf = buf;
buf = NULL; buf = NULL;
ek->keybuflen = len; ek->keybuflen = len;
err = 0;
} }
else else
err = agent_write_private_key (ctrl, grip, buf, len, force, err = agent_write_private_key (ctrl, grip, buf, len, force,