1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* options.h, gpg.c (main), passphrase.c (passphrase_to_dek): Add

--passphrase-repeat option to control how many times gpg will
re-prompt for a passphrase to ensure the user has typed it correctly.
Defaults to 1.
This commit is contained in:
David Shaw 2006-12-03 04:38:53 +00:00
parent 29f48b5fdc
commit e0cd2d31a1
4 changed files with 55 additions and 32 deletions

View file

@ -219,6 +219,7 @@ enum cmd_and_opt_values
oPasswd,
oPasswdFD,
oPasswdFile,
oPasswdRepeat,
oCommandFD,
oCommandFile,
oQuickRandom,
@ -578,6 +579,7 @@ static ARGPARSE_OPTS opts[] = {
{ oPasswd, "passphrase",2, "@" },
{ oPasswdFD, "passphrase-fd",1, "@" },
{ oPasswdFile, "passphrase-file",2, "@" },
{ oPasswdRepeat, "passphrase-repeat", 1, "@"},
{ oCommandFD, "command-fd",1, "@" },
{ oCommandFile, "command-file",2, "@" },
{ oQuickRandom, "quick-random", 0, "@"},
@ -1819,6 +1821,7 @@ main (int argc, char **argv )
opt.def_sig_expire="0";
opt.def_cert_expire="0";
set_homedir ( default_homedir () );
opt.passwd_repeat=1;
#ifdef ENABLE_CARD_SUPPORT
#if defined(_WIN32) || defined(__CYGWIN__)
@ -2440,6 +2443,7 @@ main (int argc, char **argv )
case oPasswdFile:
pwfd = open_info_file (pargs.r.ret_str, 0);
break;
case oPasswdRepeat: opt.passwd_repeat=pargs.r.ret_int; break;
case oCommandFD:
opt.command_fd = iobuf_translate_file_handle (pargs.r.ret_int, 0);
break;