chiark / gitweb /
gpg: Avoid spurious warnings about trust packets.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 6 May 2017 02:37:23 +0000 (22:37 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 18 Sep 2017 20:41:12 +0000 (21:41 +0100)
* g10/keydb.c (parse_keyblock_image): Do not emit a warning when
skipping a trust packet.

--

2.1.20 and later store trust packets in the keybox.  If an older
version (like 2.1.18) ends up accessing a keybox that 2.1.20 or later
has used, it produces many spurious warnings like:

    gpg: skipped packet of type 12 in keybox

This is a temporary cleanup to avoid these specific warnings; it can
be dropped when moving to 2.1.20 or later.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Gbp-Pq: Topic avoid-spurious-warnings
Gbp-Pq: Name 0078-gpg-Avoid-spurious-warnings-about-trust-packets.patch

g10/keydb.c

index aab90e380d93969ada190f9dcb45be961f1c3336..81dd32ec9e56de0784a7c011d31c3477b5567055 100644 (file)
@@ -1205,8 +1205,9 @@ parse_keyblock_image (iobuf_t iobuf, int pk_no, int uid_no,
         default:
           /* Note that can't allow ring trust packets here and some of
              the other GPG specific packets don't make sense either.  */
-          log_error ("skipped packet of type %d in keybox\n",
-                     (int)pkt->pkttype);
+          if (pkt->pkttype != PKT_RING_TRUST)
+            log_error ("skipped packet of type %d in keybox\n",
+                       (int)pkt->pkttype);
           free_packet(pkt);
           init_packet(pkt);
           continue;