Get GPG Agent's socket directly from the agent.
* src/agent.c (agent_connect): Call gpg-connect-agent to get the socket for a running agent. * src/get-path.c (get_gpg_connect_agent_path): New function. * src/support.h (get_gpg_connect_agent_path): New prototype. * configure.ac: New option --with-gpg-connect-agent-path.
This patch replaces all the logic needed to find the socket for
a running GnuPG Agent by a single call to gpg-connect-agent.
This will ensure we will always be able to find the agent,
without having to duplicate the logic already implemented in
GnuPG. Gpg-connect-agent will also take care of starting the
agent if it's not already running.
- GnuPG-bug-id: T3195
- Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>