aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgtar.h
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2015-11-24 17:39:30 +0000
committerJustus Winter <[email protected]>2015-11-25 11:19:50 +0000
commit40dbee86f3043aff8a8c2055521e270318e33068 (patch)
tree9f04ed386099beb56a59c085fab0e4f7c6e92e4a /tools/gpgtar.h
parentcommon: Add stream interface to call-pgp. (diff)
downloadgnupg-40dbee86f3043aff8a8c2055521e270318e33068.tar.gz
gnupg-40dbee86f3043aff8a8c2055521e270318e33068.zip
tools: Add encryption and decryption support to gpgtar.
* tools/Makefile.am: Amend CFLAGS and LDADD. * tools/gpgtar-create.c (gpgtar_create): Add encrypt flag and encrypt stream if requested. * tools/gpgtar-extract.c (gpgtar_extract): Likewise for decryption. * tools/gpgtar-list.c (gpgtar_list): Likewise. * tools/gpgtar.c (main): Initialize npth and assuan. Parse recipient and local user, and note which flags are currently ignored. Adapt calls to gpgtar_list and friends. (tar_and_encrypt): Drop stub function and prototype. (decrypt_and_untar): Likewise. (decrypt_and_list): Likewise. * tools/gpgtar.h (gpgtar_{create,extract,list}): Add encryption or decryption argument. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tools/gpgtar.h')
-rw-r--r--tools/gpgtar.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gpgtar.h b/tools/gpgtar.h
index 08dfcf8b7..a96ee09b3 100644
--- a/tools/gpgtar.h
+++ b/tools/gpgtar.h
@@ -21,13 +21,17 @@
#define GPGTAR_H
#include "../common/util.h"
+#include "../common/strlist.h"
/* We keep all global options in the structure OPT. */
struct
{
int verbose;
+ unsigned int debug_level;
int quiet;
const char *outfile;
+ strlist_t recipients;
+ const char *user;
int symmetric;
const char *filename;
} opt;
@@ -111,13 +115,13 @@ gpg_error_t read_record (estream_t stream, void *record);
gpg_error_t write_record (estream_t stream, const void *record);
/*-- gpgtar-create.c --*/
-void gpgtar_create (char **inpattern);
+void gpgtar_create (char **inpattern, int encrypt);
/*-- gpgtar-extract.c --*/
-void gpgtar_extract (const char *filename);
+void gpgtar_extract (const char *filename, int decrypt);
/*-- gpgtar-list.c --*/
-void gpgtar_list (const char *filename);
+void gpgtar_list (const char *filename, int decrypt);
tar_header_t gpgtar_read_header (estream_t stream);
void gpgtar_print_header (tar_header_t header, estream_t out);