aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 1080f9992..81bf454c2 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -127,6 +127,8 @@ enum cmd_and_opt_values
aSendKeys,
aRecvKeys,
aSearchKeys,
+ aRefreshKeys,
+ aFetchKeys,
aExport,
aExportSecret,
aExportSecretSub,
@@ -149,7 +151,6 @@ enum cmd_and_opt_values
aGenRandom,
aPipeMode,
aRebuildKeydbCaches,
- aRefreshKeys,
aCardStatus,
aCardEdit,
aChangePIN,
@@ -399,6 +400,7 @@ static ARGPARSE_OPTS opts[] = {
N_("search for keys on a key server") },
{ aRefreshKeys, "refresh-keys", 256,
N_("update all keys from a keyserver")},
+ { aFetchKeys, "fetch-keys" , 256, "@" },
{ aExportSecret, "export-secret-keys" , 256, "@" },
{ aExportSecretSub, "export-secret-subkeys" , 256, "@" },
{ aImport, "import", 256 , N_("import/merge keys")},
@@ -1901,6 +1903,7 @@ main (int argc, char **argv )
case aRecvKeys:
case aSearchKeys:
case aRefreshKeys:
+ case aFetchKeys:
case aExport:
set_cmd (&cmd, pargs.r_opt);
break;
@@ -3389,6 +3392,16 @@ main (int argc, char **argv )
free_strlist(sl);
break;
+ case aFetchKeys:
+ sl = NULL;
+ for( ; argc; argc--, argv++ )
+ add_to_strlist2( &sl, *argv, utf8_strings );
+ rc=keyserver_fetch(sl);
+ if(rc)
+ log_error("key fetch failed: %s\n",g10_errstr(rc));
+ free_strlist(sl);
+ break;
+
case aExportSecret:
sl = NULL;
for( ; argc; argc--, argv++ )