From b713d8464f9993e3e3f6d0158f0ad6445fbb4ea9 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Sat, 29 Nov 2003 22:59:10 +0000 Subject: [PATCH] * keygen.c (ask_algo): Remove ability to generate Elgamal sign+encrypt keys. --- g10/ChangeLog | 3 +++ g10/keygen.c | 29 ++++++----------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index e3b1ecf8f..ddb50192d 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,8 @@ 2003-11-29 David Shaw + * keygen.c (ask_algo): Remove ability to generate Elgamal + sign+encrypt keys. + * revoke.c (gen_desig_revoke): Specify in the comment when a designated revocation is generated. diff --git a/g10/keygen.c b/g10/keygen.c index 547a24902..fac9f3975 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -958,13 +958,11 @@ ask_algo (int addmode, unsigned int *r_usage) tty_printf( _(" (%d) DSA (sign only)\n"), 2 ); if( addmode ) tty_printf( _(" (%d) ElGamal (encrypt only)\n"), 3 ); - if (opt.expert) - tty_printf( _(" (%d) ElGamal (sign and encrypt)\n"), 4 ); - tty_printf( _(" (%d) RSA (sign only)\n"), 5 ); + tty_printf( _(" (%d) RSA (sign only)\n"), 4 ); if (addmode) - tty_printf( _(" (%d) RSA (encrypt only)\n"), 6 ); + tty_printf( _(" (%d) RSA (encrypt only)\n"), 5 ); if (opt.expert) - tty_printf( _(" (%d) RSA (sign and encrypt)\n"), 7 ); + tty_printf( _(" (%d) RSA (sign and encrypt)\n"), 6 ); for(;;) { answer = cpr_get("keygen.algo",_("Your selection? ")); @@ -975,36 +973,21 @@ ask_algo (int addmode, unsigned int *r_usage) algo = 0; /* create both keys */ break; } - else if( algo == 7 && opt.expert ) { + else if( algo == 6 && opt.expert ) { algo = PUBKEY_ALGO_RSA; *r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG; break; } - else if( algo == 6 && addmode ) { + else if( algo == 5 && addmode ) { algo = PUBKEY_ALGO_RSA; *r_usage = PUBKEY_USAGE_ENC; break; } - else if( algo == 5 ) { + else if( algo == 4 ) { algo = PUBKEY_ALGO_RSA; *r_usage = PUBKEY_USAGE_SIG; break; } - else if( algo == 4 && opt.expert) - { - tty_printf(_( -"The use of this algorithm is only supported by GnuPG. You will not be\n" -"able to use this key to communicate with PGP users. This algorithm is also\n" -"very slow, and may not be as secure as the other choices.\n")); - - if( cpr_get_answer_is_yes("keygen.algo.elg_se", - _("Create anyway? "))) - { - algo = PUBKEY_ALGO_ELGAMAL; - *r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG; - break; - } - } else if( algo == 3 && addmode ) { algo = PUBKEY_ALGO_ELGAMAL_E; *r_usage = PUBKEY_USAGE_ENC;