mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
* keygen.c (ask_algo): Remove ability to generate Elgamal sign+encrypt
keys.
This commit is contained in:
parent
96afb2dcfb
commit
b713d8464f
@ -1,5 +1,8 @@
|
|||||||
2003-11-29 David Shaw <dshaw@jabberwocky.com>
|
2003-11-29 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keygen.c (ask_algo): Remove ability to generate Elgamal
|
||||||
|
sign+encrypt keys.
|
||||||
|
|
||||||
* revoke.c (gen_desig_revoke): Specify in the comment when a
|
* revoke.c (gen_desig_revoke): Specify in the comment when a
|
||||||
designated revocation is generated.
|
designated revocation is generated.
|
||||||
|
|
||||||
|
29
g10/keygen.c
29
g10/keygen.c
@ -958,13 +958,11 @@ ask_algo (int addmode, unsigned int *r_usage)
|
|||||||
tty_printf( _(" (%d) DSA (sign only)\n"), 2 );
|
tty_printf( _(" (%d) DSA (sign only)\n"), 2 );
|
||||||
if( addmode )
|
if( addmode )
|
||||||
tty_printf( _(" (%d) ElGamal (encrypt only)\n"), 3 );
|
tty_printf( _(" (%d) ElGamal (encrypt only)\n"), 3 );
|
||||||
if (opt.expert)
|
tty_printf( _(" (%d) RSA (sign only)\n"), 4 );
|
||||||
tty_printf( _(" (%d) ElGamal (sign and encrypt)\n"), 4 );
|
|
||||||
tty_printf( _(" (%d) RSA (sign only)\n"), 5 );
|
|
||||||
if (addmode)
|
if (addmode)
|
||||||
tty_printf( _(" (%d) RSA (encrypt only)\n"), 6 );
|
tty_printf( _(" (%d) RSA (encrypt only)\n"), 5 );
|
||||||
if (opt.expert)
|
if (opt.expert)
|
||||||
tty_printf( _(" (%d) RSA (sign and encrypt)\n"), 7 );
|
tty_printf( _(" (%d) RSA (sign and encrypt)\n"), 6 );
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
answer = cpr_get("keygen.algo",_("Your selection? "));
|
answer = cpr_get("keygen.algo",_("Your selection? "));
|
||||||
@ -975,36 +973,21 @@ ask_algo (int addmode, unsigned int *r_usage)
|
|||||||
algo = 0; /* create both keys */
|
algo = 0; /* create both keys */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( algo == 7 && opt.expert ) {
|
else if( algo == 6 && opt.expert ) {
|
||||||
algo = PUBKEY_ALGO_RSA;
|
algo = PUBKEY_ALGO_RSA;
|
||||||
*r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG;
|
*r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( algo == 6 && addmode ) {
|
else if( algo == 5 && addmode ) {
|
||||||
algo = PUBKEY_ALGO_RSA;
|
algo = PUBKEY_ALGO_RSA;
|
||||||
*r_usage = PUBKEY_USAGE_ENC;
|
*r_usage = PUBKEY_USAGE_ENC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( algo == 5 ) {
|
else if( algo == 4 ) {
|
||||||
algo = PUBKEY_ALGO_RSA;
|
algo = PUBKEY_ALGO_RSA;
|
||||||
*r_usage = PUBKEY_USAGE_SIG;
|
*r_usage = PUBKEY_USAGE_SIG;
|
||||||
break;
|
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 ) {
|
else if( algo == 3 && addmode ) {
|
||||||
algo = PUBKEY_ALGO_ELGAMAL_E;
|
algo = PUBKEY_ALGO_ELGAMAL_E;
|
||||||
*r_usage = PUBKEY_USAGE_ENC;
|
*r_usage = PUBKEY_USAGE_ENC;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user