1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

* keygen.c (ask_algo): Make the Elgamal sign+encrypt warning stronger, and

remove the RSA sign+encrypt warning.

* import.c (import_one): Warn when importing an Elgamal primary that this
may take some time (to verify self-sigs). (chk_self_sigs): Try and cache
all self-sigs so the keyblock is written to the keyring with a good rich
cache.
This commit is contained in:
David Shaw 2002-12-06 04:05:47 +00:00
parent 6a52cba167
commit b7b7e6c25a
3 changed files with 34 additions and 10 deletions

View File

@ -1,3 +1,13 @@
2002-12-05 David Shaw <dshaw@jabberwocky.com>
* keygen.c (ask_algo): Make the Elgamal sign+encrypt warning
stronger, and remove the RSA sign+encrypt warning.
* import.c (import_one): Warn when importing an Elgamal primary
that this may take some time (to verify self-sigs).
(chk_self_sigs): Try and cache all self-sigs so the keyblock is
written to the keyring with a good rich cache.
2002-12-05 Werner Koch <wk@gnupg.org> 2002-12-05 Werner Koch <wk@gnupg.org>
* g10.c: New options --[no-]mangle-dos-filenames. * g10.c: New options --[no-]mangle-dos-filenames.

View File

@ -571,6 +571,10 @@ import_one( const char *fname, KBNODE keyblock, int fast,
keyid_from_pk( pk, keyid ); keyid_from_pk( pk, keyid );
uidnode = find_next_kbnode( keyblock, PKT_USER_ID ); uidnode = find_next_kbnode( keyblock, PKT_USER_ID );
if(pk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)
log_info(_("NOTE: Elgamal primary key detected - "
"this may take some time to import\n"));
if( opt.verbose ) { if( opt.verbose ) {
log_info( "pub %4u%c/%08lX %s ", log_info( "pub %4u%c/%08lX %s ",
nbits_from_pk( pk ), nbits_from_pk( pk ),
@ -1038,6 +1042,12 @@ chk_self_sigs( const char *fname, KBNODE keyblock,
continue; continue;
sig = n->pkt->pkt.signature; sig = n->pkt->pkt.signature;
if( keyid[0] == sig->keyid[0] && keyid[1] == sig->keyid[1] ) { if( keyid[0] == sig->keyid[0] && keyid[1] == sig->keyid[1] ) {
/* This just caches the sigs for later use. That way we
import a fully-cached key which speeds things up. */
if(!opt.no_sig_cache)
check_key_signature(keyblock,n,NULL);
if( (sig->sig_class&~3) == 0x10 ) { if( (sig->sig_class&~3) == 0x10 ) {
KBNODE unode = find_prev_kbnode( keyblock, n, PKT_USER_ID ); KBNODE unode = find_prev_kbnode( keyblock, n, PKT_USER_ID );
if( !unode ) { if( !unode ) {

View File

@ -965,13 +965,10 @@ ask_algo (int addmode, unsigned int *r_usage)
break; break;
} }
else if( algo == 7 && opt.expert ) { else if( algo == 7 && opt.expert ) {
if (cpr_get_answer_is_yes ("keygen.algo.rsa_se",_(
"The use of this algorithm is deprecated - create anyway? "))){
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 == 6 && addmode ) {
algo = PUBKEY_ALGO_RSA; algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_ENC; *r_usage = PUBKEY_USAGE_ENC;
@ -982,9 +979,16 @@ ask_algo (int addmode, unsigned int *r_usage)
*r_usage = PUBKEY_USAGE_SIG; *r_usage = PUBKEY_USAGE_SIG;
break; break;
} }
else if( algo == 4 && opt.expert) { else if( algo == 4 && opt.expert)
if( cpr_get_answer_is_yes("keygen.algo.elg_se",_( {
"The use of this algorithm is deprecated - create anyway? "))){ 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; algo = PUBKEY_ALGO_ELGAMAL;
break; break;
} }