Changeset View
Changeset View
Standalone View
Standalone View
g10/gpg.c
Show First 20 Lines • Show All 1,823 Lines • ▼ Show 20 Lines | /* List options and default values in the GPG Conf format. This is a | ||||
new tool distributed with gnupg 1.9.x but we also want some limited | new tool distributed with gnupg 1.9.x but we also want some limited | ||||
support in older gpg versions. The output is the name of the | support in older gpg versions. The output is the name of the | ||||
configuration file and a list of options available for editing by | configuration file and a list of options available for editing by | ||||
gpgconf. */ | gpgconf. */ | ||||
static void | static void | ||||
gpgconf_list (const char *configfile) | gpgconf_list (const char *configfile) | ||||
{ | { | ||||
char *configfile_esc = percent_escape (configfile, NULL); | char *configfile_esc = percent_escape (configfile, NULL); | ||||
char *pubkey_esc = percent_escape (get_default_pubkey_algo (), ","); | |||||
es_printf ("%s-%s.conf:%lu:\"%s\n", | es_printf ("%s-%s.conf:%lu:\"%s\n", | ||||
GPGCONF_NAME, GPG_NAME, | GPGCONF_NAME, GPG_NAME, | ||||
GC_OPT_FLAG_DEFAULT, | GC_OPT_FLAG_DEFAULT, | ||||
configfile_esc ? configfile_esc : "/dev/null"); | configfile_esc ? configfile_esc : "/dev/null"); | ||||
es_printf ("verbose:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("verbose:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("quiet:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("quiet:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("keyserver:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("keyserver:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("reader-port:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("reader-port:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("default-key:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("default-key:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("encrypt-to:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("encrypt-to:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("try-secret-key:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("try-secret-key:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("auto-key-locate:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("auto-key-locate:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("auto-key-retrieve:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("auto-key-retrieve:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("log-file:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("log-file:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("debug-level:%lu:\"none:\n", GC_OPT_FLAG_DEFAULT); | es_printf ("debug-level:%lu:\"none:\n", GC_OPT_FLAG_DEFAULT); | ||||
es_printf ("group:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("group:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("compliance:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT, "gnupg"); | es_printf ("compliance:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT, "gnupg"); | ||||
es_printf ("default-new-key-algo:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("default-new-key-algo:%lu:\n", GC_OPT_FLAG_NONE); | ||||
es_printf ("trust-model:%lu:\n", GC_OPT_FLAG_NONE); | es_printf ("trust-model:%lu:\n", GC_OPT_FLAG_NONE); | ||||
/* The next one is an info only item and should match the macros at | /* The next one is an info only item and should match the macros at | ||||
the top of keygen.c */ | the top of keygen.c */ | ||||
es_printf ("default_pubkey_algo:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT, | es_printf ("default_pubkey_algo:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT, | ||||
get_default_pubkey_algo ()); | pubkey_esc); | ||||
xfree (configfile_esc); | xfree (configfile_esc); | ||||
xfree (pubkey_esc); | |||||
} | } | ||||
static int | static int | ||||
parse_subpacket_list(char *list) | parse_subpacket_list(char *list) | ||||
{ | { | ||||
char *tok; | char *tok; | ||||
byte subpackets[128],i; | byte subpackets[128],i; | ||||
▲ Show 20 Lines • Show All 3,491 Lines • Show Last 20 Lines |