From 9a4f506a18ed04f5dbd69d74ec0c35ade79e357a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 10 Feb 1999 16:22:40 +0000 Subject: See ChangeLog: Wed Feb 10 17:15:39 CET 1999 Werner Koch --- g10/pubkey-enc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'g10/pubkey-enc.c') diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c index f662c6206..af77a1e52 100644 --- a/g10/pubkey-enc.c +++ b/g10/pubkey-enc.c @@ -31,6 +31,7 @@ #include "trustdb.h" #include "cipher.h" #include "status.h" +#include "options.h" #include "i18n.h" static int get_it( PKT_pubkey_enc *k, @@ -179,9 +180,17 @@ get_it( PKT_pubkey_enc *k, DEK *dek, PKT_secret_key *sk, u32 *keyid ) else if( !pk->local_id && query_trust_record(pk) ) log_error("can't check algorithm against preferences\n"); else if( dek->algo != CIPHER_ALGO_3DES - && !is_algo_in_prefs( pk->local_id, PREFTYPE_SYM, dek->algo ) ) - log_info(_("NOTE: cipher algorithm %d not found in preferences\n"), + && !is_algo_in_prefs( pk->local_id, PREFTYPE_SYM, dek->algo ) ) { + /* Don't print a note while we are not on verbose mode, + * the cipher is blowfish and the preferences have twofish + * listed */ + if( opt.verbose || dek->algo != CIPHER_ALGO_BLOWFISH + || !is_algo_in_prefs( pk->local_id, PREFTYPE_SYM, + CIPHER_ALGO_TWOFISH ) ) + log_info(_( + "NOTE: cipher algorithm %d not found in preferences\n"), dek->algo ); + } free_public_key( pk ); rc = 0; } -- cgit v1.2.3