aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog2
-rw-r--r--g10/gpg.c5
-rw-r--r--g10/keygen.c2
3 files changed, 9 insertions, 0 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index ed9482e3a..c075d2160 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -3,6 +3,8 @@
* gpg.c (set_debug): Allow for numerical debug levels. Print
active debug flags.
+ * gpg.c (gpgconf_list): Add key "default_pubkey_algo".
+
2009-09-28 Werner Koch <[email protected]>
* trustdb.c (get_validity_info): Take care of a NULL PK. Fixes
diff --git a/g10/gpg.c b/g10/gpg.c
index 9555be38c..cdbc7b990 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1613,6 +1613,11 @@ gpgconf_list (const char *configfile)
printf ("debug-level:%lu:\"none:\n", GC_OPT_FLAG_DEFAULT);
printf ("group:%lu:\n", GC_OPT_FLAG_NONE);
+ /* The next one is an info only item and should match what
+ keygen:ask_keysize actually implements. */
+ printf ("default_pubkey_algo:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT,
+ "RSA-2048");
+
xfree (configfile_esc);
}
diff --git a/g10/keygen.c b/g10/keygen.c
index 3abc19bd0..3e0f36e8f 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -1765,6 +1765,8 @@ ask_algo (int addmode, int *r_subkey_algo, unsigned int *r_usage)
static unsigned
ask_keysize (int algo, unsigned int primary_keysize)
{
+ /* NOTE: If you change the default key size/algo, remember to change
+ it also in gpg.c:gpgconf_list. */
unsigned int nbits, min, def=2048, max=4096;
int for_subkey = !!primary_keysize;
int autocomp = 0;