Home GnuPG
Diffusion GnuPG 4473db1ef240

agent: Kludge to mitigate blocking calls in Libgcrypt.
4473db1ef240Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

agent: Kludge to mitigate blocking calls in Libgcrypt.

* agent/gpg-agent.c (agent_libgcrypt_progress_cb): Sleep for 100ms on
"need_entropy".

During key generation Libgrypt will read from /dev/random which may
block. Libgcrypt is not nPth aware and thus the entire process will
block. Fortunately there is also a select with a short timeout to run
the progress callback. We detect this in gpg-agent and introduce a
short delay to give other threads (i.e. connections) an opportunity to
run.

This alone is not sufficient, an updated Libgpg-error is also required
to make the lock functions nPth aware.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Nov 11 2016, 8:35 PM
Parents
rG7b04a43c0583: dirmngr: Prepare to trigger jobs by network activity.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG4473db1ef240: agent: Kludge to mitigate blocking calls in Libgcrypt. (authored by Werner Koch <wk@gnupg.org>).Nov 11 2016, 8:36 PM