aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2007-04-17 04:00:38 +0000
committerDavid Shaw <[email protected]>2007-04-17 04:00:38 +0000
commit2e81dd1b989603ba4a7b52e785a847c8a367b82b (patch)
treec4a76390f827583c5f56cc5595df0eaedeedd26d
parent* gpgkeys_hkp.c (main): Show curl or fake-curl version string. (diff)
downloadgnupg-2e81dd1b989603ba4a7b52e785a847c8a367b82b.tar.gz
gnupg-2e81dd1b989603ba4a7b52e785a847c8a367b82b.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).
-rw-r--r--g10/ChangeLog7
-rw-r--r--g10/decrypt.c5
-rw-r--r--g10/mainproc.c10
-rw-r--r--g10/packet.h5
-rw-r--r--g10/verify.c4
5 files changed, 24 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index dc043b7e2..f16d4254b 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,5 +1,12 @@
2007-04-16 David Shaw <[email protected]>
+ * 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).
+
* gpg.c, pkclist.c: #include <strings.h> for strcasecmp if it is
present. Note that autoconf protects us against a strings.h that
cannot be used together with string.h.
diff --git a/g10/decrypt.c b/g10/decrypt.c
index 171e265a9..6d48037c0 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.
*
@@ -185,6 +185,7 @@ decrypt_messages(int nfiles, char *files[])
write_status( STATUS_FILE_DONE );
iobuf_ioctl( NULL, 2, 0, NULL); /* Invalidate entire cache. */
xfree(output);
+ reset_literals_seen();
}
set_next_passphrase(NULL);
diff --git a/g10/mainproc.c b/g10/mainproc.c
index a1913864c..c80c7df22 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.
*
@@ -88,6 +88,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 f3181332f..89ec62c9c 100644
--- a/g10/packet.h
+++ b/g10/packet.h
@@ -1,6 +1,6 @@
/* packet.h - 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.
*
@@ -423,6 +423,7 @@ struct notation
};
/*-- mainproc.c --*/
+void reset_literals_seen(void);
int proc_packets( void *ctx, IOBUF a );
int proc_signature_packets( void *ctx, IOBUF a,
STRLIST signedfiles, const char *sigfile );
diff --git a/g10/verify.c b/g10/verify.c
index 082db89de..2c1b36ccf 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.
*
@@ -169,6 +170,7 @@ verify_one_file( const char *name )
rc = proc_signature_packets( NULL, fp, NULL, name );
iobuf_close(fp);
write_status( STATUS_FILE_DONE );
+ reset_literals_seen();
return rc;
}