diff --git a/g10/ChangeLog b/g10/ChangeLog index 808e12021..5ebaaaad5 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +2003-10-26 David Shaw + + * mainproc.c (proc_symkey_enc, proc_encrypted): Keep a count of + the number of passphrases that can decrypt a symmetric or mixed + symmetric/pk message and include it in the list of keys shown to + the user. + 2003-10-25 David Shaw * mainproc.c (symkey_decrypt_sesskey): There is no way to tell the diff --git a/g10/mainproc.c b/g10/mainproc.c index 4b32ae8f4..f0d2db1fa 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -50,7 +50,6 @@ struct kidlist_item { }; - /**************** * Structure to hold the context */ @@ -72,6 +71,7 @@ struct mainproc_context { IOBUF iobuf; /* used to get the filename etc. */ int trustletter; /* temp usage in list_node */ ulong local_id; /* ditto */ + ulong symkeys; struct kidlist_item *pkenc_list; /* list of encryption packets */ struct { int op; @@ -327,7 +327,9 @@ proc_symkey_enc( CTX c, PACKET *pkt ) c->dek->algo_info_printed = 1; } } + leave: + c->symkeys++; free_packet(pkt); } @@ -477,10 +479,15 @@ proc_encrypted( CTX c, PACKET *pkt ) { int result = 0; - if (!opt.quiet) { + if (!opt.quiet) + { + if(c->symkeys>1) + log_info(_("encrypted with %lu passphrases\n"),c->symkeys); + else if(c->symkeys==1) + log_info(_("encrypted with 1 passphrase\n")); print_pkenc_list ( c->pkenc_list, 1 ); print_pkenc_list ( c->pkenc_list, 0 ); - } + } write_status( STATUS_BEGIN_DECRYPTION );