2004-03-06 20:11:19 +00:00
|
|
|
/* asshelp.c - Helper functions for Assuan
|
2009-07-07 10:02:41 +00:00
|
|
|
* Copyright (C) 2002, 2004, 2007, 2009 Free Software Foundation, Inc.
|
2004-03-06 20:11:19 +00:00
|
|
|
*
|
|
|
|
* This file is part of GnuPG.
|
|
|
|
*
|
|
|
|
* GnuPG is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2007-07-04 19:49:40 +00:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2004-03-06 20:11:19 +00:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* GnuPG is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2007-07-04 19:49:40 +00:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2004-03-06 20:11:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#ifdef HAVE_LOCALE_H
|
|
|
|
#include <locale.h>
|
|
|
|
#endif
|
|
|
|
|
2007-06-21 18:44:48 +00:00
|
|
|
#include "i18n.h"
|
2004-03-06 20:11:19 +00:00
|
|
|
#include "util.h"
|
2007-06-21 18:44:48 +00:00
|
|
|
#include "exechelp.h"
|
|
|
|
#include "sysutils.h"
|
2007-11-19 16:03:50 +00:00
|
|
|
#include "status.h"
|
2004-03-06 20:11:19 +00:00
|
|
|
#include "asshelp.h"
|
|
|
|
|
2004-12-15 14:15:54 +00:00
|
|
|
static gpg_error_t
|
2004-12-18 10:22:10 +00:00
|
|
|
send_one_option (assuan_context_t ctx, gpg_err_source_t errsource,
|
2009-07-07 10:02:41 +00:00
|
|
|
const char *name, const char *value, int use_putenv)
|
2004-12-15 14:15:54 +00:00
|
|
|
{
|
|
|
|
gpg_error_t err;
|
|
|
|
char *optstr;
|
|
|
|
|
2008-10-20 13:53:23 +00:00
|
|
|
(void)errsource;
|
|
|
|
|
2004-12-15 14:15:54 +00:00
|
|
|
if (!value || !*value)
|
|
|
|
err = 0; /* Avoid sending empty strings. */
|
2009-07-07 10:02:41 +00:00
|
|
|
else if (asprintf (&optstr, "OPTION %s%s=%s",
|
|
|
|
use_putenv? "putenv=":"", name, value) < 0)
|
2006-09-14 16:50:33 +00:00
|
|
|
err = gpg_error_from_syserror ();
|
2004-12-15 14:15:54 +00:00
|
|
|
else
|
|
|
|
{
|
2006-09-06 16:35:52 +00:00
|
|
|
err = assuan_transact (ctx, optstr, NULL, NULL, NULL, NULL, NULL, NULL);
|
2008-05-27 12:03:50 +00:00
|
|
|
xfree (optstr);
|
2004-12-15 14:15:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-11-19 16:03:50 +00:00
|
|
|
/* Send the assuan commands pertaining to the pinentry environment. The
|
2004-12-15 14:15:54 +00:00
|
|
|
OPT_* arguments are optional and may be used to override the
|
2004-03-06 20:11:19 +00:00
|
|
|
defaults taken from the current locale. */
|
|
|
|
gpg_error_t
|
|
|
|
send_pinentry_environment (assuan_context_t ctx,
|
2004-12-18 10:22:10 +00:00
|
|
|
gpg_err_source_t errsource,
|
2004-03-06 20:11:19 +00:00
|
|
|
const char *opt_lc_ctype,
|
2007-11-19 16:03:50 +00:00
|
|
|
const char *opt_lc_messages,
|
2009-07-07 10:02:41 +00:00
|
|
|
session_env_t session_env)
|
|
|
|
|
2004-03-06 20:11:19 +00:00
|
|
|
{
|
2004-12-15 14:15:54 +00:00
|
|
|
gpg_error_t err = 0;
|
2004-03-06 20:11:19 +00:00
|
|
|
char *old_lc = NULL;
|
|
|
|
char *dft_lc = NULL;
|
2009-07-07 10:02:41 +00:00
|
|
|
const char *dft_ttyname;
|
|
|
|
int iterator;
|
|
|
|
const char *name, *assname, *value;
|
|
|
|
int is_default;
|
2004-03-06 20:11:19 +00:00
|
|
|
|
2009-07-07 10:02:41 +00:00
|
|
|
iterator = 0;
|
|
|
|
while ((name = session_env_list_stdenvnames (&iterator, &assname)))
|
2004-03-06 20:11:19 +00:00
|
|
|
{
|
2009-07-07 10:02:41 +00:00
|
|
|
value = session_env_getenv_or_default (session_env, name, NULL);
|
|
|
|
if (!value)
|
|
|
|
continue;
|
2004-12-15 14:15:54 +00:00
|
|
|
|
2009-07-07 10:02:41 +00:00
|
|
|
if (assname)
|
|
|
|
err = send_one_option (ctx, errsource, assname, value, 0);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
err = send_one_option (ctx, errsource, name, value, 1);
|
|
|
|
if (gpg_err_code (err) == GPG_ERR_UNKNOWN_OPTION)
|
|
|
|
err = 0; /* Server too old; can't pass the new envvars. */
|
|
|
|
}
|
2004-12-15 14:15:54 +00:00
|
|
|
if (err)
|
|
|
|
return err;
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
2004-12-15 14:15:54 +00:00
|
|
|
|
2009-07-07 10:02:41 +00:00
|
|
|
|
|
|
|
dft_ttyname = session_env_getenv_or_default (session_env, "GPG_TTY",
|
|
|
|
&is_default);
|
|
|
|
if (dft_ttyname && !is_default)
|
|
|
|
dft_ttyname = NULL; /* We need the default value. */
|
2004-12-15 14:15:54 +00:00
|
|
|
|
|
|
|
/* Send the value for LC_CTYPE. */
|
2004-03-06 20:11:19 +00:00
|
|
|
#if defined(HAVE_SETLOCALE) && defined(LC_CTYPE)
|
|
|
|
old_lc = setlocale (LC_CTYPE, NULL);
|
|
|
|
if (old_lc)
|
|
|
|
{
|
2008-05-27 12:03:50 +00:00
|
|
|
old_lc = xtrystrdup (old_lc);
|
2004-03-06 20:11:19 +00:00
|
|
|
if (!old_lc)
|
2006-09-14 16:50:33 +00:00
|
|
|
return gpg_error_from_syserror ();
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
|
|
|
dft_lc = setlocale (LC_CTYPE, "");
|
|
|
|
#endif
|
|
|
|
if (opt_lc_ctype || (dft_ttyname && dft_lc))
|
|
|
|
{
|
2004-12-18 10:22:10 +00:00
|
|
|
err = send_one_option (ctx, errsource, "lc-ctype",
|
2009-07-07 10:02:41 +00:00
|
|
|
opt_lc_ctype ? opt_lc_ctype : dft_lc, 0);
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
|
|
|
#if defined(HAVE_SETLOCALE) && defined(LC_CTYPE)
|
|
|
|
if (old_lc)
|
|
|
|
{
|
|
|
|
setlocale (LC_CTYPE, old_lc);
|
2008-05-27 12:03:50 +00:00
|
|
|
xfree (old_lc);
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
|
|
|
#endif
|
2004-12-15 14:15:54 +00:00
|
|
|
if (err)
|
|
|
|
return err;
|
|
|
|
|
|
|
|
/* Send the value for LC_MESSAGES. */
|
2004-03-06 20:11:19 +00:00
|
|
|
#if defined(HAVE_SETLOCALE) && defined(LC_MESSAGES)
|
|
|
|
old_lc = setlocale (LC_MESSAGES, NULL);
|
|
|
|
if (old_lc)
|
|
|
|
{
|
2008-05-27 12:03:50 +00:00
|
|
|
old_lc = xtrystrdup (old_lc);
|
2004-03-06 20:11:19 +00:00
|
|
|
if (!old_lc)
|
2006-09-14 16:50:33 +00:00
|
|
|
return gpg_error_from_syserror ();
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
|
|
|
dft_lc = setlocale (LC_MESSAGES, "");
|
|
|
|
#endif
|
|
|
|
if (opt_lc_messages || (dft_ttyname && dft_lc))
|
|
|
|
{
|
2005-01-03 11:30:43 +00:00
|
|
|
err = send_one_option (ctx, errsource, "lc-messages",
|
2009-07-07 10:02:41 +00:00
|
|
|
opt_lc_messages ? opt_lc_messages : dft_lc, 0);
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
|
|
|
#if defined(HAVE_SETLOCALE) && defined(LC_MESSAGES)
|
|
|
|
if (old_lc)
|
|
|
|
{
|
|
|
|
setlocale (LC_MESSAGES, old_lc);
|
2008-05-27 12:03:50 +00:00
|
|
|
xfree (old_lc);
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
|
|
|
#endif
|
2004-12-15 14:15:54 +00:00
|
|
|
if (err)
|
|
|
|
return err;
|
2004-03-06 20:11:19 +00:00
|
|
|
|
2004-12-15 14:15:54 +00:00
|
|
|
return 0;
|
2004-03-06 20:11:19 +00:00
|
|
|
}
|
|
|
|
|
2007-06-21 18:44:48 +00:00
|
|
|
|
|
|
|
/* Try to connect to the agent via socket or fork it off and work by
|
|
|
|
pipes. Handle the server's initial greeting. Returns a new assuan
|
|
|
|
context at R_CTX or an error code. */
|
|
|
|
gpg_error_t
|
|
|
|
start_new_gpg_agent (assuan_context_t *r_ctx,
|
|
|
|
gpg_err_source_t errsource,
|
|
|
|
const char *homedir,
|
|
|
|
const char *agent_program,
|
|
|
|
const char *opt_lc_ctype,
|
|
|
|
const char *opt_lc_messages,
|
2009-07-07 10:02:41 +00:00
|
|
|
session_env_t session_env,
|
2007-06-21 18:44:48 +00:00
|
|
|
int verbose, int debug,
|
|
|
|
gpg_error_t (*status_cb)(ctrl_t, int, ...),
|
|
|
|
ctrl_t status_cb_arg)
|
|
|
|
{
|
|
|
|
/* If we ever failed to connect via a socket we will force the use
|
|
|
|
of the pipe based server for the lifetime of the process. */
|
|
|
|
static int force_pipe_server = 0;
|
|
|
|
|
|
|
|
gpg_error_t rc = 0;
|
|
|
|
char *infostr, *p;
|
|
|
|
assuan_context_t ctx;
|
|
|
|
|
|
|
|
*r_ctx = NULL;
|
|
|
|
|
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION):
Update to new API (2, 1.1.0).
agent/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-agent.c (parse_rereadable_options): Don't set global assuan
log file (there ain't one anymore).
(main): Update to new API.
(check_own_socket_pid_cb): Return gpg_error_t instead of int.
(check_own_socket_thread, check_for_running_agent): Create assuan
context before connecting to server.
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(write_and_clear_outbuf): Use gpg_error_t instead of
assuan_error_t.
(cmd_geteventcounter, cmd_istrusted, cmd_listtrusted)
(cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc)
(cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey)
(cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase)
(cmd_get_confirmation, cmd_learn, cmd_passwd)
(cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval)
(cmd_updatestartuptty, cmd_killagent, cmd_reloadagent)
(cmd_getinfo, option_handler): Return gpg_error_t instead of int.
(post_cmd_notify): Change type of ERR to gpg_error_t from int.
(io_monitor): Add hook argument. Use symbols for constants.
(register_commands): Change return type of HANDLER to gpg_error_t.
(start_command_handler): Allocate assuan context before starting
server.
* call-pinentry.c: Include "scdaemon.h" before <assuan.h> because
of GPG_ERR_SOURCE_DEFAULT check.
(unlock_pinentry): Call assuan_release instead of
assuan_disconnect.
(getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int.
(start_pinentry): Allocate assuan context before connecting to
server.
* call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb)
(membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru)
(pass_data_thru): Change return type to gpg_error_t.
(start_scd): Allocate assuan context before connecting to server.
common/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* asshelp.c (start_new_gpg_agent): Allocate assuan context before
starting server.
g10/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* call-agent.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(learn_status_cb, dummy_data_cb, get_serialno_cb, default_inq_cb)
(learn_status_cb, inq_writecert_parms, inq_writekey_parms)
(scd_genkey_cb, membuf_data_cb): Return gpg_error_t instead of
int.
* gpg.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(main): Update to new Assuan API.
* server.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, do_listkeys, cmd_listkeys)
(cmd_listsecretkeys, cmd_genkey, cmd_getinfo): Return gpg_error_t
instead of int.
(register_commands): Allocate assuan context before starting
server.
(gpg_server): Allocate assuan_context before starting server.
scd/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, open_card, cmd_serialno, cmd_lean, cmd_readcert)
(cmd_readkey, cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt)
(cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
(cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_lock)
(cmd_unlock, cmd_getinfo, cmd_restart, cmd_disconnect, cmd_apdu)
(cmd_killscd): Return gpg_error_t instead of int.
(scd_command_handler): Allocate assuan context before starting server.
* scdaemon.c (main): Update to new Assuan API.
sm/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpgsm.c (main): Update to new assuan API.
* server.c: Include "gpgsm.h" before <assuan.h> due to check for
GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys)
(cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey)
(cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int.
(register_commands): Same for member HANDLER in table.
(gpgsm_server): Allocate assuan context before starting server.
* sm/call-dirmngr.c:
* call-dirmngr.c (prepare_dirmngr): Check for CTX and error before
setting LDAPSERVER.
(start_dirmngr_ext): Allocate assuan context before starting
server.
(inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb)
(run_command_cb, run_command_inq_cb, run_command_status_cb):
Return gpg_error_t instead of int.
tools/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response)
(main): Update to new Assuan API.
2009-09-23 00:01:25 +00:00
|
|
|
rc = assuan_new (&ctx);
|
|
|
|
if (rc)
|
|
|
|
{
|
|
|
|
log_error ("error allocating assuan context: %s\n", gpg_strerror (rc));
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2007-06-21 18:44:48 +00:00
|
|
|
restart:
|
|
|
|
infostr = force_pipe_server? NULL : getenv ("GPG_AGENT_INFO");
|
|
|
|
if (!infostr || !*infostr)
|
|
|
|
{
|
|
|
|
char *sockname;
|
|
|
|
|
|
|
|
/* First check whether we can connect at the standard
|
|
|
|
socket. */
|
|
|
|
sockname = make_filename (homedir, "S.gpg-agent", NULL);
|
2009-11-05 12:06:45 +00:00
|
|
|
rc = assuan_socket_connect (ctx, sockname, 0, 0);
|
2007-06-21 18:44:48 +00:00
|
|
|
|
|
|
|
if (rc)
|
|
|
|
{
|
|
|
|
/* With no success start a new server. */
|
|
|
|
if (verbose)
|
|
|
|
log_info (_("no running gpg-agent - starting one\n"));
|
|
|
|
|
|
|
|
if (status_cb)
|
|
|
|
status_cb (status_cb_arg, STATUS_PROGRESS,
|
|
|
|
"starting_agent ? 0 0", NULL);
|
|
|
|
|
|
|
|
if (fflush (NULL))
|
|
|
|
{
|
|
|
|
gpg_error_t tmperr = gpg_error (gpg_err_code_from_errno (errno));
|
|
|
|
log_error ("error flushing pending output: %s\n",
|
|
|
|
strerror (errno));
|
|
|
|
xfree (sockname);
|
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION):
Update to new API (2, 1.1.0).
agent/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-agent.c (parse_rereadable_options): Don't set global assuan
log file (there ain't one anymore).
(main): Update to new API.
(check_own_socket_pid_cb): Return gpg_error_t instead of int.
(check_own_socket_thread, check_for_running_agent): Create assuan
context before connecting to server.
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(write_and_clear_outbuf): Use gpg_error_t instead of
assuan_error_t.
(cmd_geteventcounter, cmd_istrusted, cmd_listtrusted)
(cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc)
(cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey)
(cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase)
(cmd_get_confirmation, cmd_learn, cmd_passwd)
(cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval)
(cmd_updatestartuptty, cmd_killagent, cmd_reloadagent)
(cmd_getinfo, option_handler): Return gpg_error_t instead of int.
(post_cmd_notify): Change type of ERR to gpg_error_t from int.
(io_monitor): Add hook argument. Use symbols for constants.
(register_commands): Change return type of HANDLER to gpg_error_t.
(start_command_handler): Allocate assuan context before starting
server.
* call-pinentry.c: Include "scdaemon.h" before <assuan.h> because
of GPG_ERR_SOURCE_DEFAULT check.
(unlock_pinentry): Call assuan_release instead of
assuan_disconnect.
(getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int.
(start_pinentry): Allocate assuan context before connecting to
server.
* call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb)
(membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru)
(pass_data_thru): Change return type to gpg_error_t.
(start_scd): Allocate assuan context before connecting to server.
common/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* asshelp.c (start_new_gpg_agent): Allocate assuan context before
starting server.
g10/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* call-agent.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(learn_status_cb, dummy_data_cb, get_serialno_cb, default_inq_cb)
(learn_status_cb, inq_writecert_parms, inq_writekey_parms)
(scd_genkey_cb, membuf_data_cb): Return gpg_error_t instead of
int.
* gpg.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(main): Update to new Assuan API.
* server.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, do_listkeys, cmd_listkeys)
(cmd_listsecretkeys, cmd_genkey, cmd_getinfo): Return gpg_error_t
instead of int.
(register_commands): Allocate assuan context before starting
server.
(gpg_server): Allocate assuan_context before starting server.
scd/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, open_card, cmd_serialno, cmd_lean, cmd_readcert)
(cmd_readkey, cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt)
(cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
(cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_lock)
(cmd_unlock, cmd_getinfo, cmd_restart, cmd_disconnect, cmd_apdu)
(cmd_killscd): Return gpg_error_t instead of int.
(scd_command_handler): Allocate assuan context before starting server.
* scdaemon.c (main): Update to new Assuan API.
sm/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpgsm.c (main): Update to new assuan API.
* server.c: Include "gpgsm.h" before <assuan.h> due to check for
GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys)
(cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey)
(cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int.
(register_commands): Same for member HANDLER in table.
(gpgsm_server): Allocate assuan context before starting server.
* sm/call-dirmngr.c:
* call-dirmngr.c (prepare_dirmngr): Check for CTX and error before
setting LDAPSERVER.
(start_dirmngr_ext): Allocate assuan context before starting
server.
(inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb)
(run_command_cb, run_command_inq_cb, run_command_status_cb):
Return gpg_error_t instead of int.
tools/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response)
(main): Update to new Assuan API.
2009-09-23 00:01:25 +00:00
|
|
|
assuan_release (ctx);
|
2007-06-21 18:44:48 +00:00
|
|
|
return tmperr;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!agent_program || !*agent_program)
|
|
|
|
agent_program = gnupg_module_name (GNUPG_MODULE_NAME_AGENT);
|
|
|
|
|
|
|
|
#ifdef HAVE_W32_SYSTEM
|
|
|
|
{
|
|
|
|
/* Under Windows we start the server in daemon mode. This
|
|
|
|
is because the default is to use the standard socket
|
|
|
|
and thus there is no need for the GPG_AGENT_INFO
|
|
|
|
envvar. This is possible as we don't have a real unix
|
|
|
|
domain socket but use a plain file and thus there is no
|
|
|
|
need to care about non-local file systems. */
|
|
|
|
const char *argv[3];
|
|
|
|
|
|
|
|
argv[0] = "--daemon";
|
|
|
|
argv[1] = "--use-standard-socket";
|
|
|
|
argv[2] = NULL;
|
|
|
|
|
|
|
|
rc = gnupg_spawn_process_detached (agent_program, argv, NULL);
|
|
|
|
if (rc)
|
|
|
|
log_debug ("failed to start agent `%s': %s\n",
|
|
|
|
agent_program, gpg_strerror (rc));
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Give the agent some time to prepare itself. */
|
|
|
|
gnupg_sleep (3);
|
|
|
|
/* Now try again to connect the agent. */
|
2009-12-08 04:09:36 +00:00
|
|
|
rc = assuan_socket_connect (ctx, sockname, 0, 0);
|
2007-06-21 18:44:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#else /*!HAVE_W32_SYSTEM*/
|
|
|
|
{
|
|
|
|
const char *pgmname;
|
|
|
|
const char *argv[3];
|
|
|
|
int no_close_list[3];
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if ( !(pgmname = strrchr (agent_program, '/')))
|
|
|
|
pgmname = agent_program;
|
|
|
|
else
|
|
|
|
pgmname++;
|
|
|
|
|
|
|
|
argv[0] = pgmname;
|
|
|
|
argv[1] = "--server";
|
|
|
|
argv[2] = NULL;
|
|
|
|
|
|
|
|
i=0;
|
|
|
|
if (log_get_fd () != -1)
|
2009-12-08 04:43:15 +00:00
|
|
|
no_close_list[i++] = assuan_fd_from_posix_fd (log_get_fd ());
|
|
|
|
no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr));
|
2007-06-21 18:44:48 +00:00
|
|
|
no_close_list[i] = -1;
|
|
|
|
|
|
|
|
/* Connect to the agent and perform initial handshaking. */
|
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION):
Update to new API (2, 1.1.0).
agent/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-agent.c (parse_rereadable_options): Don't set global assuan
log file (there ain't one anymore).
(main): Update to new API.
(check_own_socket_pid_cb): Return gpg_error_t instead of int.
(check_own_socket_thread, check_for_running_agent): Create assuan
context before connecting to server.
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(write_and_clear_outbuf): Use gpg_error_t instead of
assuan_error_t.
(cmd_geteventcounter, cmd_istrusted, cmd_listtrusted)
(cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc)
(cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey)
(cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase)
(cmd_get_confirmation, cmd_learn, cmd_passwd)
(cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval)
(cmd_updatestartuptty, cmd_killagent, cmd_reloadagent)
(cmd_getinfo, option_handler): Return gpg_error_t instead of int.
(post_cmd_notify): Change type of ERR to gpg_error_t from int.
(io_monitor): Add hook argument. Use symbols for constants.
(register_commands): Change return type of HANDLER to gpg_error_t.
(start_command_handler): Allocate assuan context before starting
server.
* call-pinentry.c: Include "scdaemon.h" before <assuan.h> because
of GPG_ERR_SOURCE_DEFAULT check.
(unlock_pinentry): Call assuan_release instead of
assuan_disconnect.
(getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int.
(start_pinentry): Allocate assuan context before connecting to
server.
* call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb)
(membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru)
(pass_data_thru): Change return type to gpg_error_t.
(start_scd): Allocate assuan context before connecting to server.
common/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* asshelp.c (start_new_gpg_agent): Allocate assuan context before
starting server.
g10/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* call-agent.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(learn_status_cb, dummy_data_cb, get_serialno_cb, default_inq_cb)
(learn_status_cb, inq_writecert_parms, inq_writekey_parms)
(scd_genkey_cb, membuf_data_cb): Return gpg_error_t instead of
int.
* gpg.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(main): Update to new Assuan API.
* server.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, do_listkeys, cmd_listkeys)
(cmd_listsecretkeys, cmd_genkey, cmd_getinfo): Return gpg_error_t
instead of int.
(register_commands): Allocate assuan context before starting
server.
(gpg_server): Allocate assuan_context before starting server.
scd/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, open_card, cmd_serialno, cmd_lean, cmd_readcert)
(cmd_readkey, cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt)
(cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
(cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_lock)
(cmd_unlock, cmd_getinfo, cmd_restart, cmd_disconnect, cmd_apdu)
(cmd_killscd): Return gpg_error_t instead of int.
(scd_command_handler): Allocate assuan context before starting server.
* scdaemon.c (main): Update to new Assuan API.
sm/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpgsm.c (main): Update to new assuan API.
* server.c: Include "gpgsm.h" before <assuan.h> due to check for
GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys)
(cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey)
(cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int.
(register_commands): Same for member HANDLER in table.
(gpgsm_server): Allocate assuan context before starting server.
* sm/call-dirmngr.c:
* call-dirmngr.c (prepare_dirmngr): Check for CTX and error before
setting LDAPSERVER.
(start_dirmngr_ext): Allocate assuan context before starting
server.
(inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb)
(run_command_cb, run_command_inq_cb, run_command_status_cb):
Return gpg_error_t instead of int.
tools/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response)
(main): Update to new Assuan API.
2009-09-23 00:01:25 +00:00
|
|
|
rc = assuan_pipe_connect (ctx, agent_program, argv,
|
2009-11-05 12:06:45 +00:00
|
|
|
no_close_list, NULL, NULL, 0);
|
2007-06-21 18:44:48 +00:00
|
|
|
}
|
|
|
|
#endif /*!HAVE_W32_SYSTEM*/
|
|
|
|
}
|
|
|
|
xfree (sockname);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int prot;
|
|
|
|
int pid;
|
|
|
|
|
|
|
|
infostr = xstrdup (infostr);
|
|
|
|
if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr)
|
|
|
|
{
|
|
|
|
log_error (_("malformed GPG_AGENT_INFO environment variable\n"));
|
|
|
|
xfree (infostr);
|
|
|
|
force_pipe_server = 1;
|
|
|
|
goto restart;
|
|
|
|
}
|
|
|
|
*p++ = 0;
|
|
|
|
pid = atoi (p);
|
|
|
|
while (*p && *p != PATHSEP_C)
|
|
|
|
p++;
|
|
|
|
prot = *p? atoi (p+1) : 0;
|
|
|
|
if (prot != 1)
|
|
|
|
{
|
|
|
|
log_error (_("gpg-agent protocol version %d is not supported\n"),
|
|
|
|
prot);
|
|
|
|
xfree (infostr);
|
|
|
|
force_pipe_server = 1;
|
|
|
|
goto restart;
|
|
|
|
}
|
|
|
|
|
2009-11-05 12:06:45 +00:00
|
|
|
rc = assuan_socket_connect (ctx, infostr, pid, 0);
|
2007-06-21 18:44:48 +00:00
|
|
|
xfree (infostr);
|
|
|
|
if (gpg_err_code (rc) == GPG_ERR_ASS_CONNECT_FAILED)
|
|
|
|
{
|
|
|
|
log_info (_("can't connect to the agent - trying fall back\n"));
|
|
|
|
force_pipe_server = 1;
|
|
|
|
goto restart;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (rc)
|
|
|
|
{
|
|
|
|
log_error ("can't connect to the agent: %s\n", gpg_strerror (rc));
|
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION):
Update to new API (2, 1.1.0).
agent/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-agent.c (parse_rereadable_options): Don't set global assuan
log file (there ain't one anymore).
(main): Update to new API.
(check_own_socket_pid_cb): Return gpg_error_t instead of int.
(check_own_socket_thread, check_for_running_agent): Create assuan
context before connecting to server.
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(write_and_clear_outbuf): Use gpg_error_t instead of
assuan_error_t.
(cmd_geteventcounter, cmd_istrusted, cmd_listtrusted)
(cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc)
(cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey)
(cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase)
(cmd_get_confirmation, cmd_learn, cmd_passwd)
(cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval)
(cmd_updatestartuptty, cmd_killagent, cmd_reloadagent)
(cmd_getinfo, option_handler): Return gpg_error_t instead of int.
(post_cmd_notify): Change type of ERR to gpg_error_t from int.
(io_monitor): Add hook argument. Use symbols for constants.
(register_commands): Change return type of HANDLER to gpg_error_t.
(start_command_handler): Allocate assuan context before starting
server.
* call-pinentry.c: Include "scdaemon.h" before <assuan.h> because
of GPG_ERR_SOURCE_DEFAULT check.
(unlock_pinentry): Call assuan_release instead of
assuan_disconnect.
(getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int.
(start_pinentry): Allocate assuan context before connecting to
server.
* call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb)
(membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru)
(pass_data_thru): Change return type to gpg_error_t.
(start_scd): Allocate assuan context before connecting to server.
common/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* asshelp.c (start_new_gpg_agent): Allocate assuan context before
starting server.
g10/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* call-agent.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(learn_status_cb, dummy_data_cb, get_serialno_cb, default_inq_cb)
(learn_status_cb, inq_writecert_parms, inq_writekey_parms)
(scd_genkey_cb, membuf_data_cb): Return gpg_error_t instead of
int.
* gpg.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(main): Update to new Assuan API.
* server.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, do_listkeys, cmd_listkeys)
(cmd_listsecretkeys, cmd_genkey, cmd_getinfo): Return gpg_error_t
instead of int.
(register_commands): Allocate assuan context before starting
server.
(gpg_server): Allocate assuan_context before starting server.
scd/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, open_card, cmd_serialno, cmd_lean, cmd_readcert)
(cmd_readkey, cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt)
(cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
(cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_lock)
(cmd_unlock, cmd_getinfo, cmd_restart, cmd_disconnect, cmd_apdu)
(cmd_killscd): Return gpg_error_t instead of int.
(scd_command_handler): Allocate assuan context before starting server.
* scdaemon.c (main): Update to new Assuan API.
sm/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpgsm.c (main): Update to new assuan API.
* server.c: Include "gpgsm.h" before <assuan.h> due to check for
GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys)
(cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey)
(cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int.
(register_commands): Same for member HANDLER in table.
(gpgsm_server): Allocate assuan context before starting server.
* sm/call-dirmngr.c:
* call-dirmngr.c (prepare_dirmngr): Check for CTX and error before
setting LDAPSERVER.
(start_dirmngr_ext): Allocate assuan context before starting
server.
(inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb)
(run_command_cb, run_command_inq_cb, run_command_status_cb):
Return gpg_error_t instead of int.
tools/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response)
(main): Update to new Assuan API.
2009-09-23 00:01:25 +00:00
|
|
|
assuan_release (ctx);
|
2007-06-21 18:44:48 +00:00
|
|
|
return gpg_error (GPG_ERR_NO_AGENT);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (debug)
|
|
|
|
log_debug ("connection to agent established\n");
|
|
|
|
|
|
|
|
rc = assuan_transact (ctx, "RESET",
|
|
|
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
|
|
|
if (!rc)
|
|
|
|
rc = send_pinentry_environment (ctx, errsource,
|
2007-11-19 16:03:50 +00:00
|
|
|
opt_lc_ctype, opt_lc_messages,
|
2009-07-07 10:02:41 +00:00
|
|
|
session_env);
|
2007-06-21 18:44:48 +00:00
|
|
|
if (rc)
|
|
|
|
{
|
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION):
Update to new API (2, 1.1.0).
agent/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-agent.c (parse_rereadable_options): Don't set global assuan
log file (there ain't one anymore).
(main): Update to new API.
(check_own_socket_pid_cb): Return gpg_error_t instead of int.
(check_own_socket_thread, check_for_running_agent): Create assuan
context before connecting to server.
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(write_and_clear_outbuf): Use gpg_error_t instead of
assuan_error_t.
(cmd_geteventcounter, cmd_istrusted, cmd_listtrusted)
(cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc)
(cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey)
(cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase)
(cmd_get_confirmation, cmd_learn, cmd_passwd)
(cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval)
(cmd_updatestartuptty, cmd_killagent, cmd_reloadagent)
(cmd_getinfo, option_handler): Return gpg_error_t instead of int.
(post_cmd_notify): Change type of ERR to gpg_error_t from int.
(io_monitor): Add hook argument. Use symbols for constants.
(register_commands): Change return type of HANDLER to gpg_error_t.
(start_command_handler): Allocate assuan context before starting
server.
* call-pinentry.c: Include "scdaemon.h" before <assuan.h> because
of GPG_ERR_SOURCE_DEFAULT check.
(unlock_pinentry): Call assuan_release instead of
assuan_disconnect.
(getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int.
(start_pinentry): Allocate assuan context before connecting to
server.
* call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb)
(membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru)
(pass_data_thru): Change return type to gpg_error_t.
(start_scd): Allocate assuan context before connecting to server.
common/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* asshelp.c (start_new_gpg_agent): Allocate assuan context before
starting server.
g10/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* call-agent.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(learn_status_cb, dummy_data_cb, get_serialno_cb, default_inq_cb)
(learn_status_cb, inq_writecert_parms, inq_writekey_parms)
(scd_genkey_cb, membuf_data_cb): Return gpg_error_t instead of
int.
* gpg.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(main): Update to new Assuan API.
* server.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, do_listkeys, cmd_listkeys)
(cmd_listsecretkeys, cmd_genkey, cmd_getinfo): Return gpg_error_t
instead of int.
(register_commands): Allocate assuan context before starting
server.
(gpg_server): Allocate assuan_context before starting server.
scd/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* command.c: Include "scdaemon.h" before <assuan.h> because of
GPG_ERR_SOURCE_DEFAULT check.
(option_handler, open_card, cmd_serialno, cmd_lean, cmd_readcert)
(cmd_readkey, cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt)
(cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
(cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_lock)
(cmd_unlock, cmd_getinfo, cmd_restart, cmd_disconnect, cmd_apdu)
(cmd_killscd): Return gpg_error_t instead of int.
(scd_command_handler): Allocate assuan context before starting server.
* scdaemon.c (main): Update to new Assuan API.
sm/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpgsm.c (main): Update to new assuan API.
* server.c: Include "gpgsm.h" before <assuan.h> due to check for
GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h.
(option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
(cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
(cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys)
(cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey)
(cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int.
(register_commands): Same for member HANDLER in table.
(gpgsm_server): Allocate assuan context before starting server.
* sm/call-dirmngr.c:
* call-dirmngr.c (prepare_dirmngr): Check for CTX and error before
setting LDAPSERVER.
(start_dirmngr_ext): Allocate assuan context before starting
server.
(inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb)
(run_command_cb, run_command_inq_cb, run_command_status_cb):
Return gpg_error_t instead of int.
tools/
2009-09-23 Marcus Brinkmann <marcus@g10code.de>
* gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response)
(main): Update to new Assuan API.
2009-09-23 00:01:25 +00:00
|
|
|
assuan_release (ctx);
|
2007-06-21 18:44:48 +00:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
*r_ctx = ctx;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|