summaryrefslogtreecommitdiffstats
path: root/g10/export.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-03-29 08:44:52 +0200
committerWerner Koch <wk@gnupg.org>2017-03-29 10:06:29 +0200
commitf5b565a5b8de3f2a3d98bc1a655e18333aee223b (patch)
treebb4a7fd99b070399dcb15be8468724c59b47d702 /g10/export.c
parentindent: Re-indent parts of build-packet.c (diff)
downloadgnupg2-f5b565a5b8de3f2a3d98bc1a655e18333aee223b.tar.xz
gnupg2-f5b565a5b8de3f2a3d98bc1a655e18333aee223b.zip
gpg: Export ring trust packets in backup mode.
* g10/export.c (write_keyblock_to_output): Export ring trust packets. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/export.c')
-rw-r--r--g10/export.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/export.c b/g10/export.c
index a7aecd65a..5b0c81ded 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -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;