diff options
author | David Shaw <dshaw@jabberwocky.com> | 2007-05-03 06:44:12 +0200 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2007-05-03 06:44:12 +0200 |
commit | 3bcccb16667def6167cd29a41b62d087b272568b (patch) | |
tree | 3f08fb97dedb6f54d33bf3b91dbbc0b21b9159a6 /g10 | |
parent | * conventional.test, encrypt.test, encrypt-dsa.test, (diff) | |
download | gnupg2-3bcccb16667def6167cd29a41b62d087b272568b.tar.xz gnupg2-3bcccb16667def6167cd29a41b62d087b272568b.zip |
* packet.h, mainproc.c (reset_literals_seen): New function to reset
the literals count.
* verify.c (verify_one_file), decrypt.c (decrypt_messages): Call it
here so we allow multiple literals in --multifile mode (in different
files - not concatenated together).
Diffstat (limited to '')
-rw-r--r-- | g10/ChangeLog | 9 | ||||
-rw-r--r-- | g10/decrypt.c | 5 | ||||
-rw-r--r-- | g10/mainproc.c | 10 | ||||
-rw-r--r-- | g10/packet.h | 5 | ||||
-rw-r--r-- | g10/verify.c | 5 |
5 files changed, 27 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index c7a190e60..7e04eb540 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,12 @@ +2007-05-02 David Shaw <dshaw@jabberwocky.com> + + * packet.h, mainproc.c (reset_literals_seen): New function to + reset the literals count. + + * verify.c (verify_one_file), decrypt.c (decrypt_messages): Call + it here so we allow multiple literals in --multifile mode (in + different files - not concatenated together). + 2007-04-26 Marcus Brinkmann <marcus@g10code.de> * passphrase.c (passphrase_to_dek): Write missing passphrase diff --git a/g10/decrypt.c b/g10/decrypt.c index 4af7c4a0d..d5d62db27 100644 --- a/g10/decrypt.c +++ b/g10/decrypt.c @@ -1,6 +1,6 @@ /* decrypt.c - verify signed data - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 - * 2004 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + * 2007 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -192,6 +192,7 @@ decrypt_messages(int nfiles, char *files[]) /* Note that we emit file_done even after an error. */ write_status( STATUS_FILE_DONE ); xfree(output); + reset_literals_seen(); } set_next_passphrase(NULL); diff --git a/g10/mainproc.c b/g10/mainproc.c index 52c0092d5..4e76ab34d 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -1,6 +1,6 @@ /* mainproc.c - handle packets - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, - * 2005, 2006 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + * 2007 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -102,6 +102,12 @@ static void list_node( CTX c, KBNODE node ); static void proc_tree( CTX c, KBNODE node ); static int literals_seen; +void +reset_literals_seen(void) +{ + literals_seen=0; +} + static void release_list( CTX c ) { diff --git a/g10/packet.h b/g10/packet.h index 9a38d76bd..d40c16031 100644 --- a/g10/packet.h +++ b/g10/packet.h @@ -1,6 +1,6 @@ /* packet.h - OpenPGP packet definitions - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - * 2006 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + * 2007 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -368,6 +368,7 @@ struct notation }; /*-- mainproc.c --*/ +void reset_literals_seen(void); int proc_packets( void *ctx, iobuf_t a ); int proc_signature_packets( void *ctx, iobuf_t a, strlist_t signedfiles, const char *sigfile ); diff --git a/g10/verify.c b/g10/verify.c index 014e53af1..36df06f23 100644 --- a/g10/verify.c +++ b/g10/verify.c @@ -1,5 +1,6 @@ /* verify.c - Verify signed data - * Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, + * 2007 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -178,6 +179,8 @@ verify_one_file( const char *name ) iobuf_close(fp); write_status( STATUS_FILE_DONE ); + reset_literals_seen(); + leave: release_armor_context (afx); release_progress_context (pfx); |