diff options
author | Werner Koch <wk@gnupg.org> | 1998-05-04 20:49:26 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-05-04 20:49:26 +0200 |
commit | 42b03f6ebdda25a5b61db72cf9aecaaf6788de16 (patch) | |
tree | a36d2fe06b19dca6f64009010e2a731b45e6b886 /g10/skclist.c | |
parent | fixed last passphrase bug (diff) | |
download | gnupg2-42b03f6ebdda25a5b61db72cf9aecaaf6788de16.tar.xz gnupg2-42b03f6ebdda25a5b61db72cf9aecaaf6788de16.zip |
new releaseV0-2-17
Diffstat (limited to 'g10/skclist.c')
-rw-r--r-- | g10/skclist.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/g10/skclist.c b/g10/skclist.c index 6d34b05bf..53fd2e985 100644 --- a/g10/skclist.c +++ b/g10/skclist.c @@ -63,14 +63,18 @@ build_skc_list( STRLIST locusr, SKC_LIST *ret_skc_list, int unlock, else if( !(rc=check_pubkey_algo2(skc->pubkey_algo, usage)) ) { SKC_LIST r; if( skc->version == 4 && (usage & 1) - && skc->pubkey_algo == PUBKEY_ALGO_ELGAMAL ) - log_info("WARNING: This is probably a PGP generated " + && skc->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) { + log_error("this is a PGP generated " "ElGamal key which is NOT secure for signatures!\n"); - r = m_alloc( sizeof *r ); - r->skc = skc; skc = NULL; - r->next = skc_list; - r->mark = 0; - skc_list = r; + free_secret_cert( skc ); skc = NULL; + } + else { + r = m_alloc( sizeof *r ); + r->skc = skc; skc = NULL; + r->next = skc_list; + r->mark = 0; + skc_list = r; + } } else { free_secret_cert( skc ); skc = NULL; @@ -89,14 +93,19 @@ build_skc_list( STRLIST locusr, SKC_LIST *ret_skc_list, int unlock, else if( !(rc=check_pubkey_algo2(skc->pubkey_algo, usage)) ) { SKC_LIST r; if( skc->version == 4 && (usage & 1) - && skc->pubkey_algo == PUBKEY_ALGO_ELGAMAL ) - log_info("WARNING: This is probably a PGP generated " - "ElGamal key which is NOT secure for signatures!\n"); - r = m_alloc( sizeof *r ); - r->skc = skc; skc = NULL; - r->next = skc_list; - r->mark = 0; - skc_list = r; + && skc->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) { + log_info("skipped '%s': this is a PGP generated " + "ElGamal key which is not secure for signatures!\n", + locusr->d ); + free_secret_cert( skc ); skc = NULL; + } + else { + r = m_alloc( sizeof *r ); + r->skc = skc; skc = NULL; + r->next = skc_list; + r->mark = 0; + skc_list = r; + } } else { free_secret_cert( skc ); skc = NULL; |