summaryrefslogtreecommitdiffstats
path: root/tools/gpgtar.c
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2015-11-30 16:21:22 +0100
committerJustus Winter <justus@g10code.com>2015-12-04 12:52:40 +0100
commit0c0dafd8e89bb702e856c661c1561e10cdcaf37f (patch)
treec5873a51c9a8ba8edf13d49c21d416a8d1011697 /tools/gpgtar.c
parentcommon: Add a stream interface to 'sh-exectool'. (diff)
downloadgnupg2-0c0dafd8e89bb702e856c661c1561e10cdcaf37f.tar.xz
gnupg2-0c0dafd8e89bb702e856c661c1561e10cdcaf37f.zip
tools/gpgtar: Use the new exectool helper.
* tools/Makefile.am: gpgtar now requires neither npth nor libassuan. * tools/gpgtar-create.c (gpgtar_create): Use the new 'sh-exectool' helper. * tools/gpgtar-extract.c (gpgtar_extract): Likewise. * tools/gpgtar-list.c (gpgtar_list): Likewise. * tools/gpgtar.c (main): Set default gpg program. Drop the initialization of npth and libassuan. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tools/gpgtar.c')
-rw-r--r--tools/gpgtar.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/tools/gpgtar.c b/tools/gpgtar.c
index a09d2f004..100fb160e 100644
--- a/tools/gpgtar.c
+++ b/tools/gpgtar.c
@@ -27,7 +27,6 @@
gpg. So here we go. */
#include <config.h>
-#include <assuan.h>
#include <ctype.h>
#include <errno.h>
#include <npth.h>
@@ -39,7 +38,6 @@
#include "util.h"
#include "i18n.h"
#include "sysutils.h"
-#include "../common/asshelp.h"
#include "../common/openpgpdefs.h"
#include "../common/init.h"
#include "../common/strlist.h"
@@ -282,11 +280,6 @@ shell_parse_argv (const char *s, int *r_argc, char ***r_argv)
return 0;
}
-/* Define Assuan hooks for NPTH. */
-
-ASSUAN_SYSTEM_NPTH_IMPL;
-
-
/* Global flags. */
enum cmd_and_opt_values cmd = 0;
int skip_crypto = 0;
@@ -412,11 +405,6 @@ main (int argc, char **argv)
/* Make sure that our subsystems are ready. */
i18n_init();
init_common_subsystems (&argc, &argv);
- npth_init ();
- assuan_set_assuan_log_prefix (log_get_prefix (NULL));
- assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
- assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH);
- assuan_sock_init ();
/* Parse the command line. */
pargs.argc = &argc;
@@ -442,9 +430,11 @@ main (int argc, char **argv)
log_info (_("NOTE: '%s' is not considered an option\n"), argv[i]);
}
+ if (! opt.gpg_program)
+ opt.gpg_program = gnupg_module_name (GNUPG_MODULE_NAME_GPG);
+
if (opt.verbose > 1)
opt.debug_level = 1024;
- setup_libassuan_logging (&opt.debug_level);
switch (cmd)
{