mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: The option --passphrase= can be empty.
* g10/gpg.c (opts): Use ARGPARSE_o_s for oPassphrase to allow empty string. GnuPG-bug-id: 4633 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
98f4eff7ff
commit
fcd766719a
@ -711,7 +711,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
"delete-secret-and-public-keys", "@"),
|
"delete-secret-and-public-keys", "@"),
|
||||||
ARGPARSE_c (aRebuildKeydbCaches, "rebuild-keydb-caches", "@"),
|
ARGPARSE_c (aRebuildKeydbCaches, "rebuild-keydb-caches", "@"),
|
||||||
|
|
||||||
ARGPARSE_s_s (oPassphrase, "passphrase", "@"),
|
ARGPARSE_o_s (oPassphrase, "passphrase", "@"),
|
||||||
ARGPARSE_s_i (oPassphraseFD, "passphrase-fd", "@"),
|
ARGPARSE_s_i (oPassphraseFD, "passphrase-fd", "@"),
|
||||||
ARGPARSE_s_s (oPassphraseFile, "passphrase-file", "@"),
|
ARGPARSE_s_s (oPassphraseFile, "passphrase-file", "@"),
|
||||||
ARGPARSE_s_i (oPassphraseRepeat,"passphrase-repeat", "@"),
|
ARGPARSE_s_i (oPassphraseRepeat,"passphrase-repeat", "@"),
|
||||||
@ -3164,7 +3164,7 @@ main (int argc, char **argv)
|
|||||||
case oBZ2CompressLevel: opt.bz2_compress_level = pargs.r.ret_int; break;
|
case oBZ2CompressLevel: opt.bz2_compress_level = pargs.r.ret_int; break;
|
||||||
case oBZ2DecompressLowmem: opt.bz2_decompress_lowmem=1; break;
|
case oBZ2DecompressLowmem: opt.bz2_decompress_lowmem=1; break;
|
||||||
case oPassphrase:
|
case oPassphrase:
|
||||||
set_passphrase_from_string(pargs.r.ret_str);
|
set_passphrase_from_string (pargs.r_type ? pargs.r.ret_str : "");
|
||||||
break;
|
break;
|
||||||
case oPassphraseFD:
|
case oPassphraseFD:
|
||||||
pwfd = translate_sys2libc_fd_int (pargs.r.ret_int, 0);
|
pwfd = translate_sys2libc_fd_int (pargs.r.ret_int, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user