aboutsummaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-11-10 04:33:13 +0000
committerDavid Shaw <[email protected]>2003-11-10 04:33:13 +0000
commit5028edd538d966ff015274fd6150c82ea180842d (patch)
treea8a9919dc891ea200d1a7ca3d13cc18b094f6bed /g10/mainproc.c
parent* pkclist.c (build_pk_list): When adding recipients interactively, allow (diff)
downloadgnupg-5028edd538d966ff015274fd6150c82ea180842d.tar.gz
gnupg-5028edd538d966ff015274fd6150c82ea180842d.zip
* mainproc.c (proc_symkey_enc): Don't show algorithm information when
--quiet is set. Suggested by Duncan Harris. Also don't fail with BUG() when processing a --symmetric message with a cipher we don't have. * g10.c: Alias --personal-xxx-prefs to --personal-xxx-preferences.
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r--g10/mainproc.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 6fb459608..62881d651 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -292,19 +292,22 @@ proc_symkey_enc( CTX c, PACKET *pkt )
int algo = enc->cipher_algo;
const char *s = cipher_algo_to_string (algo);
- if( s )
+ if(s)
{
- if(enc->seskeylen)
- log_info(_("%s encrypted session key\n"), s );
- else
- log_info(_("%s encrypted data\n"), s );
+ if(!opt.quiet)
+ {
+ if(enc->seskeylen)
+ log_info(_("%s encrypted session key\n"), s );
+ else
+ log_info(_("%s encrypted data\n"), s );
+ }
}
else
- log_info(_("encrypted with unknown algorithm %d\n"), algo );
+ log_error(_("encrypted with unknown algorithm %d\n"), algo );
c->last_was_session_key = 2;
- if ( opt.list_only )
- goto leave;
+ if(!s || opt.list_only)
+ goto leave;
c->dek = passphrase_to_dek( NULL, 0, algo, &enc->s2k, 0, NULL, NULL );
if(c->dek)
{