mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
common: New put_membuf_cb to replace static membuf_data_cb.
* common/membuf.c (put_membuf_cb): New. * agent/call-scd.c (membuf_data_cb): Remove. Change callers to use put_membuf_cb. * common/get-passphrase.c (membuf_data_cb): Ditto. * g10/call-agent.c (membuf_data_cb): Ditto. * sm/call-agent.c (membuf_data_cb): Ditto. -- Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
8fd406c317
commit
833ba5faa1
@ -113,8 +113,6 @@ static int primary_scd_ctx_reusable;
|
|||||||
|
|
||||||
|
|
||||||
/* Local prototypes. */
|
/* Local prototypes. */
|
||||||
static gpg_error_t membuf_data_cb (void *opaque,
|
|
||||||
const void *buffer, size_t length);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -354,7 +352,7 @@ start_scd (ctrl_t ctrl)
|
|||||||
socket_name = NULL;
|
socket_name = NULL;
|
||||||
init_membuf (&data, 256);
|
init_membuf (&data, 256);
|
||||||
assuan_transact (ctx, "GETINFO socket_name",
|
assuan_transact (ctx, "GETINFO socket_name",
|
||||||
membuf_data_cb, &data, NULL, NULL, NULL, NULL);
|
put_membuf_cb, &data, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
databuf = get_membuf (&data, &datalen);
|
databuf = get_membuf (&data, &datalen);
|
||||||
if (databuf && datalen)
|
if (databuf && datalen)
|
||||||
@ -688,16 +686,6 @@ agent_card_serialno (ctrl_t ctrl, char **r_serialno)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static gpg_error_t
|
|
||||||
membuf_data_cb (void *opaque, const void *buffer, size_t length)
|
|
||||||
{
|
|
||||||
membuf_t *data = opaque;
|
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
put_membuf (data, buffer, length);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle the NEEDPIN inquiry. */
|
/* Handle the NEEDPIN inquiry. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
inq_needpin (void *opaque, const char *line)
|
inq_needpin (void *opaque, const char *line)
|
||||||
@ -855,7 +843,7 @@ agent_card_pksign (ctrl_t ctrl,
|
|||||||
snprintf (line, sizeof line, "PKSIGN %s %s",
|
snprintf (line, sizeof line, "PKSIGN %s %s",
|
||||||
hash_algo_option (mdalgo), keyid);
|
hash_algo_option (mdalgo), keyid);
|
||||||
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
inq_needpin, &inqparm,
|
inq_needpin, &inqparm,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (inqparm.any_inq_seen && (gpg_err_code(rc) == GPG_ERR_CANCELED ||
|
if (inqparm.any_inq_seen && (gpg_err_code(rc) == GPG_ERR_CANCELED ||
|
||||||
@ -944,7 +932,7 @@ agent_card_pkdecrypt (ctrl_t ctrl,
|
|||||||
snprintf (line, DIM(line)-1, "PKDECRYPT %s", keyid);
|
snprintf (line, DIM(line)-1, "PKDECRYPT %s", keyid);
|
||||||
line[DIM(line)-1] = 0;
|
line[DIM(line)-1] = 0;
|
||||||
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
inq_needpin, &inqparm,
|
inq_needpin, &inqparm,
|
||||||
padding_info_cb, r_padding);
|
padding_info_cb, r_padding);
|
||||||
if (inqparm.any_inq_seen && (gpg_err_code(rc) == GPG_ERR_CANCELED ||
|
if (inqparm.any_inq_seen && (gpg_err_code(rc) == GPG_ERR_CANCELED ||
|
||||||
@ -984,7 +972,7 @@ agent_card_readcert (ctrl_t ctrl,
|
|||||||
snprintf (line, DIM(line)-1, "READCERT %s", id);
|
snprintf (line, DIM(line)-1, "READCERT %s", id);
|
||||||
line[DIM(line)-1] = 0;
|
line[DIM(line)-1] = 0;
|
||||||
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -1020,7 +1008,7 @@ agent_card_readkey (ctrl_t ctrl, const char *id, unsigned char **r_buf)
|
|||||||
snprintf (line, DIM(line)-1, "READKEY %s", id);
|
snprintf (line, DIM(line)-1, "READKEY %s", id);
|
||||||
line[DIM(line)-1] = 0;
|
line[DIM(line)-1] = 0;
|
||||||
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
rc = assuan_transact (ctrl->scd_local->ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
@ -130,17 +130,6 @@ default_inq_cb (void *opaque, const char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gpg_error_t
|
|
||||||
membuf_data_cb (void *opaque, const void *buffer, size_t length)
|
|
||||||
{
|
|
||||||
membuf_t *data = opaque;
|
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
put_membuf (data, buffer, length);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Ask for a passphrase via gpg-agent. On success the caller needs to
|
/* Ask for a passphrase via gpg-agent. On success the caller needs to
|
||||||
free the string stored at R_PASSPHRASE. On error NULL will be
|
free the string stored at R_PASSPHRASE. On error NULL will be
|
||||||
stored at R_PASSPHRASE and an appropriate gpg error code is
|
stored at R_PASSPHRASE and an appropriate gpg error code is
|
||||||
@ -214,7 +203,7 @@ gnupg_get_passphrase (const char *cache_id,
|
|||||||
else
|
else
|
||||||
init_membuf (&data, 64);
|
init_membuf (&data, 64);
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, NULL, NULL, NULL);
|
default_inq_cb, NULL, NULL, NULL);
|
||||||
|
|
||||||
/* Older Pinentries return the old assuan error code for canceled
|
/* Older Pinentries return the old assuan error code for canceled
|
||||||
|
@ -116,6 +116,20 @@ put_membuf (membuf_t *mb, const void *buf, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* A variant of put_membuf accepting a void * and returning a
|
||||||
|
gpg_error_t (which will always return 0) to be used as a generic
|
||||||
|
callback handler. This function also allows buffer to be NULL. */
|
||||||
|
gpg_error_t
|
||||||
|
put_membuf_cb (void *opaque, const void *buf, size_t len)
|
||||||
|
{
|
||||||
|
membuf_t *data = opaque;
|
||||||
|
|
||||||
|
if (buf)
|
||||||
|
put_membuf (data, buf, len);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
put_membuf_str (membuf_t *mb, const char *string)
|
put_membuf_str (membuf_t *mb, const char *string)
|
||||||
{
|
{
|
||||||
|
@ -53,6 +53,7 @@ void init_membuf (membuf_t *mb, int initiallen);
|
|||||||
void init_membuf_secure (membuf_t *mb, int initiallen);
|
void init_membuf_secure (membuf_t *mb, int initiallen);
|
||||||
void clear_membuf (membuf_t *mb, size_t amount);
|
void clear_membuf (membuf_t *mb, size_t amount);
|
||||||
void put_membuf (membuf_t *mb, const void *buf, size_t len);
|
void put_membuf (membuf_t *mb, const void *buf, size_t len);
|
||||||
|
gpg_error_t put_membuf_cb (void *opaque, const void *buf, size_t len);
|
||||||
void put_membuf_str (membuf_t *mb, const char *string);
|
void put_membuf_str (membuf_t *mb, const char *string);
|
||||||
void put_membuf_printf (membuf_t *mb, const char *format,
|
void put_membuf_printf (membuf_t *mb, const char *format,
|
||||||
...) GPGRT_ATTR_PRINTF(2,3);
|
...) GPGRT_ATTR_PRINTF(2,3);
|
||||||
|
@ -137,18 +137,6 @@ status_sc_op_failure (int rc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gpg_error_t
|
|
||||||
membuf_data_cb (void *opaque, const void *buffer, size_t length)
|
|
||||||
{
|
|
||||||
membuf_t *data = opaque;
|
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
put_membuf (data, buffer, length);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* This is the default inquiry callback. It mainly handles the
|
/* This is the default inquiry callback. It mainly handles the
|
||||||
Pinentry notifications. */
|
Pinentry notifications. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
@ -214,7 +202,7 @@ check_hijacking (assuan_context_t ctx)
|
|||||||
/* AGENT_ID is a command implemented by gnome-keyring-daemon. It
|
/* AGENT_ID is a command implemented by gnome-keyring-daemon. It
|
||||||
does not return any data but an OK line with a remark. */
|
does not return any data but an OK line with a remark. */
|
||||||
if (assuan_transact (ctx, "AGENT_ID",
|
if (assuan_transact (ctx, "AGENT_ID",
|
||||||
membuf_data_cb, &mb, NULL, NULL, NULL, NULL))
|
put_membuf_cb, &mb, NULL, NULL, NULL, NULL))
|
||||||
{
|
{
|
||||||
xfree (get_membuf (&mb, NULL));
|
xfree (get_membuf (&mb, NULL));
|
||||||
return; /* Error - Probably not hijacked. */
|
return; /* Error - Probably not hijacked. */
|
||||||
@ -780,7 +768,7 @@ agent_scd_apdu (const char *hexapdu, unsigned int *r_sw)
|
|||||||
|
|
||||||
snprintf (line, DIM(line)-1, "SCD APDU %s", hexapdu);
|
snprintf (line, DIM(line)-1, "SCD APDU %s", hexapdu);
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &mb, NULL, NULL, NULL, NULL);
|
put_membuf_cb, &mb, NULL, NULL, NULL, NULL);
|
||||||
if (!err)
|
if (!err)
|
||||||
{
|
{
|
||||||
data = get_membuf (&mb, &datalen);
|
data = get_membuf (&mb, &datalen);
|
||||||
@ -1292,7 +1280,7 @@ agent_scd_readcert (const char *certidstr,
|
|||||||
snprintf (line, DIM(line)-1, "SCD READCERT %s", certidstr);
|
snprintf (line, DIM(line)-1, "SCD READCERT %s", certidstr);
|
||||||
line[DIM(line)-1] = 0;
|
line[DIM(line)-1] = 0;
|
||||||
rc = assuan_transact (agent_ctx, line,
|
rc = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, &dfltparm,
|
default_inq_cb, &dfltparm,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -1455,7 +1443,7 @@ agent_get_passphrase (const char *cache_id,
|
|||||||
|
|
||||||
init_membuf_secure (&data, 64);
|
init_membuf_secure (&data, 64);
|
||||||
rc = assuan_transact (agent_ctx, line,
|
rc = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, &dfltparm,
|
default_inq_cb, &dfltparm,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
@ -1553,7 +1541,7 @@ agent_get_s2k_count (unsigned long *r_count)
|
|||||||
|
|
||||||
init_membuf (&data, 32);
|
init_membuf (&data, 32);
|
||||||
err = assuan_transact (agent_ctx, "GETINFO s2k_count",
|
err = assuan_transact (agent_ctx, "GETINFO s2k_count",
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
xfree (get_membuf (&data, NULL));
|
xfree (get_membuf (&data, NULL));
|
||||||
@ -1825,7 +1813,7 @@ agent_genkey (ctrl_t ctrl, char **cache_nonce_addr,
|
|||||||
cn_parm.cache_nonce_addr = cache_nonce_addr;
|
cn_parm.cache_nonce_addr = cache_nonce_addr;
|
||||||
cn_parm.passwd_nonce_addr = NULL;
|
cn_parm.passwd_nonce_addr = NULL;
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
inq_genkey_parms, &gk_parm,
|
inq_genkey_parms, &gk_parm,
|
||||||
cache_nonce_status_cb, &cn_parm);
|
cache_nonce_status_cb, &cn_parm);
|
||||||
if (err)
|
if (err)
|
||||||
@ -1879,7 +1867,7 @@ agent_readkey (ctrl_t ctrl, int fromcard, const char *hexkeygrip,
|
|||||||
|
|
||||||
init_membuf (&data, 1024);
|
init_membuf (&data, 1024);
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, &dfltparm,
|
default_inq_cb, &dfltparm,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
@ -1967,7 +1955,7 @@ agent_pksign (ctrl_t ctrl, const char *cache_nonce,
|
|||||||
cache_nonce? " -- ":"",
|
cache_nonce? " -- ":"",
|
||||||
cache_nonce? cache_nonce:"");
|
cache_nonce? cache_nonce:"");
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, &dfltparm,
|
default_inq_cb, &dfltparm,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
@ -2097,7 +2085,7 @@ agent_pkdecrypt (ctrl_t ctrl, const char *keygrip, const char *desc,
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
err = assuan_transact (agent_ctx, "PKDECRYPT",
|
err = assuan_transact (agent_ctx, "PKDECRYPT",
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
inq_ciphertext_cb, &parm,
|
inq_ciphertext_cb, &parm,
|
||||||
padding_info_cb, r_padding);
|
padding_info_cb, r_padding);
|
||||||
xfree (parm.ciphertext);
|
xfree (parm.ciphertext);
|
||||||
@ -2177,7 +2165,7 @@ agent_keywrap_key (ctrl_t ctrl, int forexport, void **r_kek, size_t *r_keklen)
|
|||||||
|
|
||||||
init_membuf_secure (&data, 64);
|
init_membuf_secure (&data, 64);
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, &dfltparm,
|
default_inq_cb, &dfltparm,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
@ -2309,7 +2297,7 @@ agent_export_key (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
|
|||||||
cn_parm.cache_nonce_addr = cache_nonce_addr;
|
cn_parm.cache_nonce_addr = cache_nonce_addr;
|
||||||
cn_parm.passwd_nonce_addr = NULL;
|
cn_parm.passwd_nonce_addr = NULL;
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, &dfltparm,
|
default_inq_cb, &dfltparm,
|
||||||
cache_nonce_status_cb, &cn_parm);
|
cache_nonce_status_cb, &cn_parm);
|
||||||
if (err)
|
if (err)
|
||||||
@ -2428,7 +2416,7 @@ agent_get_version (ctrl_t ctrl, char **r_version)
|
|||||||
|
|
||||||
init_membuf (&data, 64);
|
init_membuf (&data, 64);
|
||||||
err = assuan_transact (agent_ctx, "GETINFO version",
|
err = assuan_transact (agent_ctx, "GETINFO version",
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
|
@ -128,18 +128,6 @@ start_agent (ctrl_t ctrl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static gpg_error_t
|
|
||||||
membuf_data_cb (void *opaque, const void *buffer, size_t length)
|
|
||||||
{
|
|
||||||
membuf_t *data = opaque;
|
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
put_membuf (data, buffer, length);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* This is the default inquiry callback. It mainly handles the
|
/* This is the default inquiry callback. It mainly handles the
|
||||||
Pinentry notifications. */
|
Pinentry notifications. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
@ -215,7 +203,7 @@ gpgsm_agent_pksign (ctrl_t ctrl, const char *keygrip, const char *desc,
|
|||||||
|
|
||||||
init_membuf (&data, 1024);
|
init_membuf (&data, 1024);
|
||||||
rc = assuan_transact (agent_ctx, "PKSIGN",
|
rc = assuan_transact (agent_ctx, "PKSIGN",
|
||||||
membuf_data_cb, &data, default_inq_cb, ctrl,
|
put_membuf_cb, &data, default_inq_cb, ctrl,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
@ -282,7 +270,7 @@ gpgsm_scd_pksign (ctrl_t ctrl, const char *keyid, const char *desc,
|
|||||||
snprintf (line, DIM(line)-1, "SCD PKSIGN %s %s", hashopt, keyid);
|
snprintf (line, DIM(line)-1, "SCD PKSIGN %s %s", hashopt, keyid);
|
||||||
line[DIM(line)-1] = 0;
|
line[DIM(line)-1] = 0;
|
||||||
rc = assuan_transact (agent_ctx, line,
|
rc = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data, default_inq_cb, ctrl,
|
put_membuf_cb, &data, default_inq_cb, ctrl,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
@ -392,7 +380,7 @@ gpgsm_agent_pkdecrypt (ctrl_t ctrl, const char *keygrip, const char *desc,
|
|||||||
cipher_parm.ciphertext = ciphertext;
|
cipher_parm.ciphertext = ciphertext;
|
||||||
cipher_parm.ciphertextlen = ciphertextlen;
|
cipher_parm.ciphertextlen = ciphertextlen;
|
||||||
rc = assuan_transact (agent_ctx, "PKDECRYPT",
|
rc = assuan_transact (agent_ctx, "PKDECRYPT",
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
inq_ciphertext_cb, &cipher_parm, NULL, NULL);
|
inq_ciphertext_cb, &cipher_parm, NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
@ -487,7 +475,7 @@ gpgsm_agent_genkey (ctrl_t ctrl,
|
|||||||
if (!gk_parm.sexplen)
|
if (!gk_parm.sexplen)
|
||||||
return gpg_error (GPG_ERR_INV_VALUE);
|
return gpg_error (GPG_ERR_INV_VALUE);
|
||||||
rc = assuan_transact (agent_ctx, "GENKEY",
|
rc = assuan_transact (agent_ctx, "GENKEY",
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
inq_genkey_parms, &gk_parm, NULL, NULL);
|
inq_genkey_parms, &gk_parm, NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
@ -536,7 +524,7 @@ gpgsm_agent_readkey (ctrl_t ctrl, int fromcard, const char *hexkeygrip,
|
|||||||
|
|
||||||
init_membuf (&data, 1024);
|
init_membuf (&data, 1024);
|
||||||
rc = assuan_transact (agent_ctx, line,
|
rc = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, ctrl, NULL, NULL);
|
default_inq_cb, ctrl, NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
@ -1117,7 +1105,7 @@ gpgsm_agent_ask_passphrase (ctrl_t ctrl, const char *desc_msg, int repeat,
|
|||||||
|
|
||||||
init_membuf_secure (&data, 64);
|
init_membuf_secure (&data, 64);
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, NULL, NULL, NULL);
|
default_inq_cb, NULL, NULL, NULL);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
@ -1157,7 +1145,7 @@ gpgsm_agent_keywrap_key (ctrl_t ctrl, int forexport,
|
|||||||
|
|
||||||
init_membuf_secure (&data, 64);
|
init_membuf_secure (&data, 64);
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, ctrl, NULL, NULL);
|
default_inq_cb, ctrl, NULL, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
@ -1251,7 +1239,7 @@ gpgsm_agent_export_key (ctrl_t ctrl, const char *keygrip, const char *desc,
|
|||||||
|
|
||||||
init_membuf_secure (&data, 1024);
|
init_membuf_secure (&data, 1024);
|
||||||
err = assuan_transact (agent_ctx, line,
|
err = assuan_transact (agent_ctx, line,
|
||||||
membuf_data_cb, &data,
|
put_membuf_cb, &data,
|
||||||
default_inq_cb, ctrl, NULL, NULL);
|
default_inq_cb, ctrl, NULL, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user