Home GnuPG
Diffusion Scute c6fb7d7f4352

Auto-reconnect after connection failures to gpg-agent.

Description

Auto-reconnect after connection failures to gpg-agent.

* src/get-path.c (gnupg_version_string): New.
(read_first_line): New.
(extract_version_string): New.  Taken from gpgme.
(get_gpgconf_path): Retrieve GnuPG version.
(get_gnupg_version): New.
(is_gnupg_older_than): New.
(get_bindir): Re-implement using read_first_line.
* src/support.h: Include gpg-error.h
* src/agent.c (agent_version_major, agent_version_minor): Remove.
(agent_connect): Implement using read_first_line.  Use combined launch
command with fallback to tow command for GnuPG < 2.2.14.
(read_version_cb): Remove.
(agent_configure): Don't send GETINFO.
(scute_agent_get_agent_version): Remove.  Change callers to use the
new get_gnupg_version.
(check_broken_pipe): New.
(ensure_agent_connection): New.
(scute_agent_learn): Ensure that an agent has been started and detect
a broekn pipe.
(scute_agent_check_status): Ditto.
(scute_agent_sign): Ditto.
(scute_agent_decrypt): Ditto.
(scute_agent_is_trusted): Ditto.
(scute_agent_get_cert): Ditto.
(scute_agent_get_random): Ditto.
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Feb 25 2019, 6:15 PM
Parents
rS8671efe71a95: Fix regression in Windows from Monday.
Branches
Unknown
Tags
Unknown