diff --git a/g10/gpg.c b/g10/gpg.c --- a/g10/gpg.c +++ b/g10/gpg.c @@ -1829,6 +1829,7 @@ gpgconf_list (const char *configfile) { char *configfile_esc = percent_escape (configfile, NULL); + char *pubkey_esc = percent_escape (get_default_pubkey_algo (), ","); es_printf ("%s-%s.conf:%lu:\"%s\n", GPGCONF_NAME, GPG_NAME, @@ -1853,9 +1854,10 @@ /* The next one is an info only item and should match the macros at the top of keygen.c */ es_printf ("default_pubkey_algo:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT, - get_default_pubkey_algo ()); + pubkey_esc); xfree (configfile_esc); + xfree (pubkey_esc); }