1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Replaced an assert and fixed batch mode issue in cardglue.

This commit is contained in:
Werner Koch 2006-03-05 15:13:18 +00:00
parent 9523139ee7
commit 09203be1c6
6 changed files with 43 additions and 14 deletions

View file

@ -404,7 +404,7 @@ proc_pubkey_enc( CTX c, PACKET *pkt )
if( !opt.list_only && opt.override_session_key ) {
/* It does not make much sense to store the session key in
* secure memory because it has already been passed on the
* command line and the GCHQ knows about it */
* command line and the GCHQ knows about it. */
c->dek = xmalloc_clear( sizeof *c->dek );
result = get_override_session_key ( c->dek, opt.override_session_key );
if ( result ) {
@ -414,6 +414,8 @@ proc_pubkey_enc( CTX c, PACKET *pkt )
else if( is_ELGAMAL(enc->pubkey_algo)
|| enc->pubkey_algo == PUBKEY_ALGO_DSA
|| is_RSA(enc->pubkey_algo) ) {
/* FIXME: strore this all in a list and process it later */
if ( !c->dek && ((!enc->keyid[0] && !enc->keyid[1])
|| opt.try_all_secrets
|| !seckey_available( enc->keyid )) ) {
@ -523,6 +525,9 @@ proc_encrypted( CTX c, PACKET *pkt )
print_pkenc_list ( c->pkenc_list, 0 );
}
/* FIXME: Figure out the session key by looking at all pkenc packets. */
write_status( STATUS_BEGIN_DECRYPTION );
/*log_debug("dat: %sencrypted data\n", c->dek?"":"conventional ");*/