[svn] GnuPG - r4278 - trunk/sm

svn author marcus cvs at cvs.gnupg.org
Mon Oct 2 12:58:09 CEST 2006


Author: marcus
Date: 2006-10-02 12:58:08 +0200 (Mon, 02 Oct 2006)
New Revision: 4278

Modified:
   trunk/sm/ChangeLog
   trunk/sm/server.c
Log:
2006-10-02  Marcus Brinkmann  <marcus at g10code.de>

        * server.c (register_commands): New commands DUMPKEYS and
        DUMPSECRETKEYS.
        (cmd_dumpkeys, cmd_dumpsecretkeys): New functions.
        (option_handler): Support with-key-data option.



Modified: trunk/sm/ChangeLog
===================================================================
--- trunk/sm/ChangeLog	2006-10-02 00:34:53 UTC (rev 4277)
+++ trunk/sm/ChangeLog	2006-10-02 10:58:08 UTC (rev 4278)
@@ -1,3 +1,10 @@
+2006-10-02  Marcus Brinkmann  <marcus at g10code.de>
+
+	* server.c (register_commands): New commands DUMPKEYS and
+	DUMPSECRETKEYS.
+	(cmd_dumpkeys, cmd_dumpsecretkeys): New functions.
+	(option_handler): Support with-key-data option.
+
 2006-09-26  Werner Koch  <wk at g10code.com>
 
 	* certchain.c (gpgsm_validate_chain): More changes for the relax

Modified: trunk/sm/server.c
===================================================================
--- trunk/sm/server.c	2006-10-02 00:34:53 UTC (rev 4277)
+++ trunk/sm/server.c	2006-10-02 10:58:08 UTC (rev 4278)
@@ -182,6 +182,10 @@
       int i = *value? atoi (value) : 0;
       ctrl->with_validation = i;
     }
+  else if (!strcmp (key, "with-key-data"))
+    {
+      opt.with_key_data = 1;
+    }
   else
     return gpg_error (GPG_ERR_UNKNOWN_OPTION);
 
@@ -644,7 +648,9 @@
 }
 
 /* LISTKEYS [<patterns>]
+   DUMPKEYS [<patterns>]
    LISTSECRETKEYS [<patterns>]
+   DUMPSECRETKEYS [<patterns>]
 */
 static int 
 do_listkeys (assuan_context_t ctx, char *line, int mode)
@@ -717,11 +723,23 @@
 }
 
 static int 
+cmd_dumpkeys (assuan_context_t ctx, char *line)
+{
+  return do_listkeys (ctx, line, 259);
+}
+
+static int 
 cmd_listsecretkeys (assuan_context_t ctx, char *line)
 {
   return do_listkeys (ctx, line, 2);
 }
 
+static int 
+cmd_dumpsecretkeys (assuan_context_t ctx, char *line)
+{
+  return do_listkeys (ctx, line, 258);
+}
+
 
 /* GENKEY
 
@@ -780,7 +798,9 @@
     { "OUTPUT",        NULL }, 
     { "MESSAGE",       cmd_message },
     { "LISTKEYS",      cmd_listkeys },
+    { "DUMPKEYS",      cmd_dumpkeys },
     { "LISTSECRETKEYS",cmd_listsecretkeys },
+    { "DUMPSECRETKEYS",cmd_dumpsecretkeys },
     { "GENKEY",        cmd_genkey },
     { "DELKEYS",       cmd_delkeys },
     { NULL }




More information about the Gnupg-commits mailing list