mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
gpg: Support 'gpgcompose --encrypted-pop --help'
* g10/gpgcompose.c (encrypted_pop_options): New variable. (encrypted_pop): Support the --help option. Reported-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
parent
8a90668656
commit
4ddf4e114c
@ -2580,18 +2580,36 @@ encrypted (const char *option, int argc, char *argv[], void *cookie)
|
|||||||
return processed;
|
return processed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct option encrypted_pop_options[] = {
|
||||||
|
{ NULL, NULL,
|
||||||
|
"Example:\n\n"
|
||||||
|
" $ gpgcompose --sk-esk PASSWORD \\\n"
|
||||||
|
" --encrypted-mdc \\\n"
|
||||||
|
" --literal --value foo \\\n"
|
||||||
|
" --encrypted-pop | " GPG_NAME " --list-packets" }
|
||||||
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
encrypted_pop (const char *option, int argc, char *argv[], void *cookie)
|
encrypted_pop (const char *option, int argc, char *argv[], void *cookie)
|
||||||
{
|
{
|
||||||
iobuf_t out = cookie;
|
iobuf_t out = cookie;
|
||||||
|
int processed;
|
||||||
|
|
||||||
(void) argc;
|
processed = process_options (option,
|
||||||
(void) argv;
|
major_options,
|
||||||
|
encrypted_pop_options,
|
||||||
|
NULL,
|
||||||
|
global_options, NULL,
|
||||||
|
argc, argv);
|
||||||
|
/* We only support a single option, --help, which causes the program
|
||||||
|
* to exit. */
|
||||||
|
log_assert (processed == 0);
|
||||||
|
|
||||||
|
filter_pop (out, PKT_ENCRYPTED);
|
||||||
|
|
||||||
debug ("Popped encryption container.\n");
|
debug ("Popped encryption container.\n");
|
||||||
|
|
||||||
return 0;
|
return processed;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct data
|
struct data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user