g10: List compression algorithms using human-readable names.
authorJustus Winter <justus@g10code.com>
Fri, 9 Dec 2016 10:46:49 +0000 (11:46 +0100)
committerJustus Winter <justus@g10code.com>
Fri, 9 Dec 2016 12:13:45 +0000 (13:13 +0100)
* g10/gpg.c (list_config): List all enabled compression algorithms
under the key 'compressname'.

Signed-off-by: Justus Winter <justus@g10code.com>
g10/gpg.c

index 19a7a41..ddb7715 100644 (file)
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1757,6 +1757,15 @@ list_config(char *items)
          any=1;
        }
 
          any=1;
        }
 
+      if(show_all || ascii_strcasecmp (name, "compressname") == 0)
+       {
+         es_printf ("cfg:compressname:");
+         print_algo_names (check_compress_algo,
+                           compress_algo_to_string);
+         es_printf ("\n");
+         any=1;
+       }
+
       if (show_all || !ascii_strcasecmp(name,"ccid-reader-id"))
        {
           /* We ignore this for GnuPG 1.4 backward compatibility.  */
       if (show_all || !ascii_strcasecmp(name,"ccid-reader-id"))
        {
           /* We ignore this for GnuPG 1.4 backward compatibility.  */