mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Add support for unwrapping the outer level of encryption.
* g10/decrypt-data.c (decrypt_data): If OPT.UNWRAP_ENCRYPTION is set, copy the data to the output file instead of continuing to process it. * g10/gpg.c (enum cmd_and_opt_values): Add new value oUnwrap. (opts): Handle oUnwrap. (main): Likewise. * g10/options.h (opt): Add field unwrap_encryption. * g10/plaintext.c (handle_plaintext): Break the output file selection functionality into ... (get_output_file): ... this new function. -- Signed-off-by: Neal H. Walfield <neal@g10code.com> GnuPG-bug-id: 1060 Debian-bug-id: 282061
This commit is contained in:
parent
fd4b9e2328
commit
ec409e62ae
5 changed files with 130 additions and 48 deletions
|
@ -391,6 +391,7 @@ enum cmd_and_opt_values
|
|||
oTOFUDefaultPolicy,
|
||||
oTOFUDBFormat,
|
||||
oWeakDigest,
|
||||
oUnwrap,
|
||||
|
||||
oNoop
|
||||
};
|
||||
|
@ -753,6 +754,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
"personal-compress-preferences", "@"),
|
||||
ARGPARSE_s_s (oFakedSystemTime, "faked-system-time", "@"),
|
||||
ARGPARSE_s_s (oWeakDigest, "weak-digest","@"),
|
||||
ARGPARSE_s_n (oUnwrap, "unwrap", "@"),
|
||||
|
||||
/* Aliases. I constantly mistype these, and assume other people do
|
||||
as well. */
|
||||
|
@ -3147,6 +3149,9 @@ main (int argc, char **argv)
|
|||
case oWeakDigest:
|
||||
additional_weak_digest(pargs.r.ret_str);
|
||||
break;
|
||||
case oUnwrap:
|
||||
opt.unwrap_encryption = 1;
|
||||
break;
|
||||
|
||||
case oDisplay:
|
||||
set_opt_session_env ("DISPLAY", pargs.r.ret_str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue