Diffusion GnuPG 6f72aa821407

kbx: Fix deadlock in gpgsm on Windows due to a sharing violation.

Authored by werner on May 14 2019, 7:05 PM.

Description

kbx: Fix deadlock in gpgsm on Windows due to a sharing violation.

* kbx/keybox-init.c (keybox_lock) [W32]: Use _keybox_close_file
instead of fclose so that a close is done if the file is opened by
another handle.
* kbx/keybox-search.c (keybox_search): Remember the last offset and
use that in NEXT search mode if we had to re-open the file.
  • GnuPG-bug-id: T4505
  • Signed-off-by: Werner Koch <wk@gnupg.org>