aboutsummaryrefslogtreecommitdiffstats
path: root/g10/skclist.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-10-28 22:09:09 +0000
committerDavid Shaw <[email protected]>2004-10-28 22:09:09 +0000
commit6ab8378c00828a4ec6919afc3710a75e93ba0502 (patch)
tree2aeb5039af192500983f8a70e6db0845d3f87de0 /g10/skclist.c
parent* DETAILS: Document SIG_SUBPACKET status tag. (diff)
downloadgnupg-6ab8378c00828a4ec6919afc3710a75e93ba0502.tar.gz
gnupg-6ab8378c00828a4ec6919afc3710a75e93ba0502.zip
* skclist.c (build_sk_list): Don't need to warn about PGP-generated
Elgamal signing keys since we no longer support any Elgamal signing keys. * sign.c (sign_file, clearsign_file): Use "writing to" instead of "writing to file" to match other strings. * pkclist.c (check_signatures_trust): Fix typo. Noted by Moray Allan. This is Debian bug #278708. * passphrase.c (ask_passphrase, passphrase_to_dek): "password" -> "passphrase". * keyedit.c (show_key_with_all_names): Show designated revoker as part of translatable string.
Diffstat (limited to 'g10/skclist.c')
-rw-r--r--g10/skclist.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/g10/skclist.c b/g10/skclist.c
index 92c83e8a8..69157d8e7 100644
--- a/g10/skclist.c
+++ b/g10/skclist.c
@@ -107,42 +107,41 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list,
SK_LIST sk_list = NULL;
int rc;
- if( !locusr ) { /* use the default one */
+ if( !locusr )
+ { /* use the default one */
PKT_secret_key *sk;
sk = m_alloc_clear( sizeof *sk );
sk->req_usage = use;
if( (rc = get_seckey_byname( sk, NULL, unlock )) ) {
- free_secret_key( sk ); sk = NULL;
- log_error("no default secret key: %s\n", g10_errstr(rc) );
+ free_secret_key( sk ); sk = NULL;
+ log_error("no default secret key: %s\n", g10_errstr(rc) );
}
- else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) ) {
+ else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) )
+ {
SK_LIST r;
- if( sk->version == 4 && (use & PUBKEY_USAGE_SIG)
- && sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) {
- log_info("this is a PGP generated "
- "Elgamal key which is NOT secure for signatures!\n");
- free_secret_key( sk ); sk = NULL;
- }
- else if( random_is_faked() && !is_insecure( sk ) ) {
+ if( random_is_faked() && !is_insecure( sk ) )
+ {
log_info(_("key is not flagged as insecure - "
"can't use it with the faked RNG!\n"));
free_secret_key( sk ); sk = NULL;
- }
- else {
+ }
+ else
+ {
r = m_alloc( sizeof *r );
r->sk = sk; sk = NULL;
r->next = sk_list;
r->mark = 0;
sk_list = r;
- }
- }
- else {
+ }
+ }
+ else
+ {
free_secret_key( sk ); sk = NULL;
log_error("invalid default secret key: %s\n", g10_errstr(rc) );
- }
- }
+ }
+ }
else {
STRLIST locusr_orig = locusr;
for(; locusr; locusr = locusr->next ) {