aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-08-05 19:54:06 +0000
committerDavid Shaw <[email protected]>2005-08-05 19:54:06 +0000
commit82bee9c68a1529249aabb61b881c96c6e06d5a4a (patch)
tree49e1f299a71ab89269c9c992ddb567cae6aa4ca8 /g10/g10.c
parent* ldap.m4: If a PATH is given to --with-ldap, bias directory (diff)
downloadgnupg-82bee9c68a1529249aabb61b881c96c6e06d5a4a.tar.gz
gnupg-82bee9c68a1529249aabb61b881c96c6e06d5a4a.zip
* g10.c (main), passphrase.c (set_passphrase_from_string): New
--passphrase command line option. Only useful in very special circumstances.
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/g10.c b/g10/g10.c
index fce9f3ad1..8d53d7df3 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -211,6 +211,7 @@ enum cmd_and_opt_values
oCompressLevel,
oBZ2CompressLevel,
oBZ2DecompressLowmem,
+ oPasswd,
oPasswdFD,
oPasswdFile,
oCommandFD,
@@ -558,6 +559,7 @@ static ARGPARSE_OPTS opts[] = {
/* { aListTrustPath, "list-trust-path",0, "@"}, */
{ aPipeMode, "pipemode", 0, "@" },
{ oKOption, NULL, 0, "@"},
+ { oPasswd, "passphrase",2, "@" },
{ oPasswdFD, "passphrase-fd",1, "@" },
{ oPasswdFile, "passphrase-file",2, "@" },
{ oCommandFD, "command-fd",1, "@" },
@@ -2270,6 +2272,9 @@ main (int argc, char **argv )
case oCompressLevel: opt.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 oPasswd:
+ set_passphrase_from_string(pargs.r.ret_str);
+ break;
case oPasswdFD:
pwfd = iobuf_translate_file_handle (pargs.r.ret_int, 0);
opt.use_agent = 0;