diff options
author | Werner Koch <[email protected]> | 2006-12-21 19:40:00 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2006-12-21 19:40:00 +0000 |
commit | 12ca74c836ccacf79f2f193afac334377e41995e (patch) | |
tree | 3a70382f306fe0602b8c9acbd9e995336dc1f097 /g10/gpg.c | |
parent | The keypad is now also used for OpenPGP signing keys. (diff) | |
download | gnupg-12ca74c836ccacf79f2f193afac334377e41995e.tar.gz gnupg-12ca74c836ccacf79f2f193afac334377e41995e.zip |
Started to code a --server mode.
It is far from being ready!
Diffstat (limited to 'g10/gpg.c')
-rw-r--r-- | g10/gpg.c | 38 |
1 files changed, 37 insertions, 1 deletions
@@ -149,6 +149,7 @@ enum cmd_and_opt_values aCardStatus, aCardEdit, aChangePIN, + aServer, oTextmode, oNoTextmode, @@ -424,7 +425,8 @@ static ARGPARSE_OPTS opts[] = { { aEnArmor, "enarmour", 256, "@"}, { aPrintMD, "print-md" , 256, N_("|algo [files]|print message digests")}, { aPrimegen, "gen-prime" , 256, "@" }, - { aGenRandom, "gen-random" , 256, "@" }, + { aGenRandom, "gen-random", 256, "@" }, + { aServer, "server", 256, N_("run in server mode")}, { 301, NULL, 0, N_("@\nOptions:\n ") }, @@ -1740,6 +1742,25 @@ encode_s2k_iterations(int iterations) return result; } + +/* This fucntion called to initialized a new control object. It is + assumed that this object has been zeroed out before calling this + function. */ +static void +gpg_init_default_ctrl (ctrl_t ctrl) +{ +} + + +/* This function is called to deinitialize a control object. It is + not deallocated. */ +static void +gpg_deinit_default_ctrl (ctrl_t ctrl) +{ +} + + + int main (int argc, char **argv ) { @@ -2094,6 +2115,10 @@ main (int argc, char **argv ) case aVerifyFiles: multifile=1; /* fall through */ case aVerify: set_cmd( &cmd, aVerify); break; + case aServer: + set_cmd (&cmd, pargs.r_opt); + opt.batch = 1; + break; case oArmor: opt.armor = 1; opt.no_armor=0; break; case oOutput: opt.outfile = pargs.r.ret_str; break; @@ -3254,6 +3279,16 @@ main (int argc, char **argv ) switch( cmd ) { + case aServer: + { + ctrl_t ctrl = xtrycalloc (1, sizeof *ctrl); + gpg_init_default_ctrl (ctrl); + gpg_server (ctrl); + gpg_deinit_default_ctrl (ctrl); + xfree (ctrl); + } + break; + case aStore: /* only store the file */ if( argc > 1 ) wrong_args(_("--store [filename]")); @@ -4169,3 +4204,4 @@ add_keyserver_url( const char *string, int which ) if(critical) sl->flags |= 1; } + |