[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.12-38-g3a4b96e
by Werner Koch
cvs at cvs.gnupg.org
Thu Dec 20 09:51:21 CET 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-1-4 has been updated
via 3a4b96e665fa639772854058737ee3d54ba0694e (commit)
via f795a0d59e197455f8723c300eebf59e09853efa (commit)
from 5c557a51cdf37d9f50b3d5d7e11d17e6ea6bb2b8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3a4b96e665fa639772854058737ee3d54ba0694e
Author: Werner Koch <wk at gnupg.org>
Date: Wed Dec 19 11:21:26 2012 +0100
gpg: Suppress "public key already present" in quiet mode.
* g10/pkclist.c (build_pk_list): Print two diagnostics only in
non-quiet mode.
--
(back-ported from commit 8325d616593187ff227853de0295e3269b96edcb)
diff --git a/g10/pkclist.c b/g10/pkclist.c
index 158ddf0..e8167c7 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -833,8 +833,9 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned int use )
if (key_present_in_pk_list(pk_list, pk) == 0)
{
free_public_key (pk); pk = NULL;
- log_info (_("%s: skipped: public key already present\n"),
- rov->d);
+ if (!opt.quiet)
+ log_info (_("%s: skipped: public key already present\n"),
+ rov->d);
}
else
{
@@ -1113,8 +1114,9 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned int use )
if (!key_present_in_pk_list(pk_list, pk))
{
free_public_key(pk); pk = NULL;
- log_info(_("%s: skipped: public key already present\n"),
- remusr->d);
+ if (!opt.quiet)
+ log_info(_("%s: skipped: public key already present\n"),
+ remusr->d);
}
else
{
commit f795a0d59e197455f8723c300eebf59e09853efa
Author: Werner Koch <wk at gnupg.org>
Date: Thu Dec 20 09:43:41 2012 +0100
Import only packets which are allowed in a keyblock.
* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--
A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring. This change skips all
packets which are not allowed in a keyblock.
GnuPG-bug-id: 1455
diff --git a/g10/import.c b/g10/import.c
index 21ada41..90fc2d6 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -343,6 +343,27 @@ import_print_stats (void *hd)
}
+/* Return true if PKTTYPE is valid in a keyblock. */
+static int
+valid_keyblock_packet (int pkttype)
+{
+ switch (pkttype)
+ {
+ case PKT_PUBLIC_KEY:
+ case PKT_PUBLIC_SUBKEY:
+ case PKT_SECRET_KEY:
+ case PKT_SECRET_SUBKEY:
+ case PKT_SIGNATURE:
+ case PKT_USER_ID:
+ case PKT_ATTRIBUTE:
+ case PKT_RING_TRUST:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+
/****************
* Read the next keyblock from stream A.
* PENDING_PKT should be initialzed to NULL
@@ -420,7 +441,7 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
}
in_cert = 1;
default:
- if( in_cert ) {
+ if (in_cert && valid_keyblock_packet (pkt->pkttype)) {
if( !root )
root = new_kbnode( pkt );
else
-----------------------------------------------------------------------
Summary of changes:
g10/import.c | 23 ++++++++++++++++++++++-
g10/pkclist.c | 10 ++++++----
2 files changed, 28 insertions(+), 5 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list