diff options
author | David Shaw <[email protected]> | 2003-10-26 23:17:47 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-10-26 23:17:47 +0000 |
commit | ef0ade2d78faae196d316dcd046b1f8c0a03339e (patch) | |
tree | 7e1a0325f004cec8cd0ef179b2f1ce71826f8d9c | |
parent | * mainproc.c (symkey_decrypt_sesskey): There is no way to tell the (diff) | |
download | gnupg-ef0ade2d78faae196d316dcd046b1f8c0a03339e.tar.gz gnupg-ef0ade2d78faae196d316dcd046b1f8c0a03339e.zip |
* 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.
-rw-r--r-- | g10/ChangeLog | 7 | ||||
-rw-r--r-- | g10/mainproc.c | 13 |
2 files changed, 17 insertions, 3 deletions
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 <[email protected]> + + * 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 <[email protected]> * 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 ); |