Home GnuPG
Diffusion GnuPG cf2d3f7ba0b7

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.
(nvc_set): Set flag unless value did not change.
(nve_set): Add arg PK.  Change the caller.
* 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
rGe43bd2a7a783: scd: New option --debug-allow-pin-logging.
Branches
Unknown
Tags
Unknown
Tasks
T6829: Kleopatra: Loop reading keys from smartcard