Home GnuPG
Diffusion GnuPG 5bab257d3a52

agent: Update the key file only if not changed.

Description

agent: Update the key file only if not changed.

* common/name-value.c (struct name_value_container): Add flag
"modified".
(nvc_modified): New.
(nvc_new): Set flag.
(_nvc_add): Set flag.
(nvc_delete): Set flag.
(nve_set): Add arg PK.  Change the caller.  Check whether to change at
all.
* agent/findkey.c (agent_write_private_key): Update only if modified.

This helps software which uses a file system watcher to track changes
to private keys. In particular smartcard triggered changes are a
problem for such software because this may at worst trigger another
smartcard read.

Details

Provenance
wernerAuthored on Nov 21 2023, 8:34 AM
Parents
rG6236a52d0e24: po: Update Japanese Translation.
Branches
Unknown
Tags
Unknown
Tasks
T6829: Kleopatra: Loop reading keys from smartcard