aboutsummaryrefslogtreecommitdiffstats
path: root/g10/pubkey-enc.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-02-10 16:22:40 +0000
committerWerner Koch <[email protected]>1999-02-10 16:22:40 +0000
commit9a4f506a18ed04f5dbd69d74ec0c35ade79e357a (patch)
tree07178f77cb23862b045b0edf8a2bc5ce188432cd /g10/pubkey-enc.c
parentSee ChangeLog: Sun Jan 24 18:16:26 CET 1999 Werner Koch (diff)
downloadgnupg-9a4f506a18ed04f5dbd69d74ec0c35ade79e357a.tar.gz
gnupg-9a4f506a18ed04f5dbd69d74ec0c35ade79e357a.zip
See ChangeLog: Wed Feb 10 17:15:39 CET 1999 Werner Koch
Diffstat (limited to 'g10/pubkey-enc.c')
-rw-r--r--g10/pubkey-enc.c13
1 files changed, 11 insertions, 2 deletions
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;
}