diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-09-16 07:45:18 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-09-16 07:45:18 +0900 |
commit | b8e317c2a634907810564598cde8cf691ef03d88 (patch) | |
tree | 7978657ccc96ec5a55c31801e14bca75291cfe4c /tools | |
parent | 028733bb89982a39cf1341937417c9d76f39b2ef (diff) | |
download | gpg2-b8e317c2a634907810564598cde8cf691ef03d88.tar.gz gpg2-b8e317c2a634907810564598cde8cf691ef03d88.tar.bz2 gpg2-b8e317c2a634907810564598cde8cf691ef03d88.zip |
Imported Upstream version 2.3.1upstream/2.3.1
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpg-card.c | 1 | ||||
-rw-r--r-- | tools/gpgconf-comp.c | 15 | ||||
-rw-r--r-- | tools/gpgsplit.c | 20 |
3 files changed, 27 insertions, 9 deletions
diff --git a/tools/gpg-card.c b/tools/gpg-card.c index d9d626c..07e9232 100644 --- a/tools/gpg-card.c +++ b/tools/gpg-card.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <ctype.h> #ifdef HAVE_LIBREADLINE # define GNUPG_LIBREADLINE_H_INCLUDED # include <readline/readline.h> diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index ca15aa8..2a5087e 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -420,12 +420,11 @@ static known_option_t known_options_gpg[] = { "completes-needed", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, { "marginals-needed", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, - { "use-keyboxd", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, - /* The next items are pseudo options which we read via --gpgconf-list. * The meta information is taken from the table below. */ { "default_pubkey_algo", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, { "compliance_de_vs", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, + { "use_keyboxd", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, { NULL } }; @@ -436,6 +435,11 @@ static const char *known_pseudo_options_gpg[] = * result is valid for all components. * v-- ARGPARSE_TYPE_INT */ "compliance_de_vs:0:1:@:", + /* True is use_keyboxd is enabled. That option can be set in + * common.conf but is not direcly supported by gpgconf. Thus we + * only allow to read it out. + * v-- ARGPARSE_TYPE_INT */ + "use_keyboxd:0:1:@:", NULL }; @@ -466,8 +470,6 @@ static known_option_t known_options_gpgsm[] = { "cipher-algo", GC_OPT_FLAG_NONE, GC_LEVEL_ADVANCED }, { "disable-trusted-cert-crl-check", GC_OPT_FLAG_NONE, GC_LEVEL_EXPERT }, - { "use-keyboxd", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, - /* Pseudo option follows. See also table below. */ { "default_pubkey_algo", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE }, @@ -946,7 +948,10 @@ gc_component_launch (int component) gc_component[component].name); if (!opt.quiet) log_info (_("Note: Use the command \"%s%s\" to get details.\n"), - gc_component[component].name, " --gpgconf-test"); + gc_component[component].program + ? gc_component[component].program + : gc_component[component].name, + " --gpgconf-test"); gpgconf_failure (0); } diff --git a/tools/gpgsplit.c b/tools/gpgsplit.c index 7257b63..cc7bf8e 100644 --- a/tools/gpgsplit.c +++ b/tools/gpgsplit.c @@ -582,7 +582,10 @@ write_part (FILE *fpin, unsigned long pktlen, { c = getc (fpin); if (c == EOF) - goto read_error; + { + xfree (blob); + goto read_error; + } blob[i] = c; } len = public_key_length (blob, pktlen); @@ -594,18 +597,27 @@ write_part (FILE *fpin, unsigned long pktlen, if ( (hdr[0] & 0x40) ) { if (write_new_header (fpout, pkttype, len)) - goto write_error; + { + xfree (blob); + goto write_error; + } } else { if (write_old_header (fpout, pkttype, len)) - goto write_error; + { + xfree (blob); + goto write_error; + } } for (i=0; i < len; i++) { if ( putc (blob[i], fpout) == EOF ) - goto write_error; + { + xfree (blob); + goto write_error; + } } goto ready; |