aboutsummaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-08-26 15:47:22 +0000
committerWerner Koch <[email protected]>2014-08-26 15:47:54 +0000
commit519305feb888b529c005b40445d041a088a2f8fc (patch)
tree74994a5b568e059982ca83a0daa8b7d96035355d /scd
parentgpg: Allow for positional parameters in the passphrase prompt. (diff)
downloadgnupg-519305feb888b529c005b40445d041a088a2f8fc.tar.gz
gnupg-519305feb888b529c005b40445d041a088a2f8fc.zip
Switch to the libgpg-error provided estream.
* configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14. (GPGRT_ENABLE_ES_MACROS): Define. (estream_INIT): Remove. * m4/estream.m4: Remove. * common/estream-printf.c, common/estream-printf.h: Remove. * common/estream.c, common/estream.h: Remove. * common/init.c (_init_common_subsystems): Call gpgrt initialization.
Diffstat (limited to 'scd')
-rw-r--r--scd/app-openpgp.c5
-rw-r--r--scd/atr.c2
-rw-r--r--scd/command.c10
-rw-r--r--scd/scdaemon.c4
4 files changed, 10 insertions, 11 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index fff097adb..9b4ab2220 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -1448,9 +1448,8 @@ get_public_key (app_t app, int keyno)
}
hexkeyid = fpr + 24;
- ret = estream_asprintf (&command,
- "gpg --list-keys --with-colons --with-key-data '%s'",
- fpr);
+ ret = gpgrt_asprintf
+ (&command, "gpg --list-keys --with-colons --with-key-data '%s'", fpr);
if (ret < 0)
{
err = gpg_error_from_syserror ();
diff --git a/scd/atr.c b/scd/atr.c
index c3fa49f4b..5b94758a5 100644
--- a/scd/atr.c
+++ b/scd/atr.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <assert.h>
-#include "../common/estream.h"
+#include <gpg-error.h>
#include "../common/logging.h"
#include "atr.h"
diff --git a/scd/command.c b/scd/command.c
index 05b50b935..dd4191f44 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -686,8 +686,8 @@ cmd_learn (assuan_context_t ctx, char *line)
{
char *command;
- rc = estream_asprintf (&command, "KNOWNCARDP %s %lu",
- serial, (unsigned long)stamp);
+ rc = gpgrt_asprintf (&command, "KNOWNCARDP %s %lu",
+ serial, (unsigned long)stamp);
if (rc < 0)
{
xfree (serial);
@@ -915,7 +915,7 @@ pin_cb (void *opaque, const char *info, char **retstr)
if (info)
{
log_debug ("prompting for pinpad entry '%s'\n", info);
- rc = estream_asprintf (&command, "POPUPPINPADPROMPT %s", info);
+ rc = gpgrt_asprintf (&command, "POPUPPINPADPROMPT %s", info);
if (rc < 0)
return gpg_error (gpg_err_code_from_errno (errno));
rc = assuan_inquire (ctx, command, &value, &valuelen, MAXLEN_PIN);
@@ -935,7 +935,7 @@ pin_cb (void *opaque, const char *info, char **retstr)
*retstr = NULL;
log_debug ("asking for PIN '%s'\n", info);
- rc = estream_asprintf (&command, "NEEDPIN %s", info);
+ rc = gpgrt_asprintf (&command, "NEEDPIN %s", info);
if (rc < 0)
return gpg_error (gpg_err_code_from_errno (errno));
@@ -2340,7 +2340,7 @@ update_reader_status_file (int set_card_removed_flag)
gpg_error_t err;
homestr = make_filename (opt.homedir, NULL);
- if (estream_asprintf (&envstr, "GNUPGHOME=%s", homestr) < 0)
+ if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s", homestr) < 0)
log_error ("out of core while building environment\n");
else
{
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index aa1588392..9cc4d117c 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -826,8 +826,8 @@ main (int argc, char **argv )
close (fd);
/* create the info string: <name>:<pid>:<protocol_version> */
- if (estream_asprintf (&infostr, "SCDAEMON_INFO=%s:%lu:1",
- socket_name, (ulong) pid) < 0)
+ if (gpgrt_asprintf (&infostr, "SCDAEMON_INFO=%s:%lu:1",
+ socket_name, (ulong) pid) < 0)
{
log_error ("out of core\n");
kill (pid, SIGTERM);