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>
This commit is contained in:
Werner Koch 2017-03-29 08:44:52 +02:00
parent 5b3523d3e0
commit f5b565a5b8
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 4 additions and 1 deletions

View 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;