gpg: Export ring trust packets in backup mode.
authorWerner Koch <wk@gnupg.org>
Wed, 29 Mar 2017 06:44:52 +0000 (08:44 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 29 Mar 2017 08:06:29 +0000 (10:06 +0200)
* g10/export.c (write_keyblock_to_output): Export ring trust packets.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/export.c

index a7aecd6..5b0c81d 100644 (file)
@@ -1282,8 +1282,11 @@ write_keyblock_to_output (kbnode_t keyblock, int with_armor,
 
   for (node = keyblock; node; node = node->next)
     {
-      if (is_deleted_kbnode (node) || node->pkt->pkttype == PKT_RING_TRUST)
+      if (is_deleted_kbnode (node))
         continue;
+      if (node->pkt->pkttype == PKT_RING_TRUST && !(options & EXPORT_BACKUP))
+        continue;
+
       if (!pk && (node->pkt->pkttype == PKT_PUBLIC_KEY
                   || node->pkt->pkttype == PKT_SECRET_KEY))
         pk = node->pkt->pkt.public_key;