1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Allow generation of DSA2 keys without --enable-dsa2.

This commit is contained in:
Werner Koch 2009-05-20 09:57:10 +00:00
parent ad6326185e
commit 556d4ed983
4 changed files with 17 additions and 16 deletions

View file

@ -1,8 +1,12 @@
2009-05-20 Werner Koch <wk@g10code.com>
* keygen.c (ask_keysize): Allow selection of DSA key size even
without --enable-dsa2.
(gen_dsa): Remove size check.
* keygen.c (ask_key_flags): Fix bug in the translation check.
Fixes bug#1056.
2009-05-18 Daiki Ueno <ueno@unixuser.org> (wk)
* encode.c (encode_simple): Tell passphrase_to_dek to cache

View file

@ -1263,7 +1263,7 @@ gen_dsa (unsigned int nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
gcry_sexp_t misc_key_info;
unsigned int qbits;
if ( nbits < 512 || (!opt.flags.dsa2 && nbits > 1024))
if ( nbits < 512)
{
nbits = 1024;
log_info(_("keysize invalid; using %u bits\n"), nbits );
@ -1768,16 +1768,8 @@ ask_keysize (int algo, unsigned int primary_keysize)
switch(algo)
{
case PUBKEY_ALGO_DSA:
if(opt.flags.dsa2)
{
def=2048;
max=3072;
}
else
{
tty_printf(_("DSA keypair will have %u bits.\n"),1024);
return 1024;
}
def=2048;
max=3072;
break;
case PUBKEY_ALGO_RSA: