aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-07-04 07:45:52 +0000
committerWerner Koch <[email protected]>2018-07-04 07:45:52 +0000
commit60e7e102a153a246d7e887a64e30dbb4c4f7b6dd (patch)
tree376f7200717c79df804c2ac4a7d981f6b2a2aa5b
parentgpg: Extra check for sign usage when verifying a data signature. (diff)
downloadgnupg-60e7e102a153a246d7e887a64e30dbb4c4f7b6dd.tar.gz
gnupg-60e7e102a153a246d7e887a64e30dbb4c4f7b6dd.zip
indent: Fix indentation of read_block in g10/import.c
-- Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--g10/import.c133
1 files changed, 67 insertions, 66 deletions
diff --git a/g10/import.c b/g10/import.c
index b20879c48..62bc6a2af 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -826,76 +826,77 @@ read_block( IOBUF a, int with_meta,
continue;
}
- if (in_v3key && !(pkt->pkttype == PKT_PUBLIC_KEY
- || pkt->pkttype == PKT_SECRET_KEY))
- {
- free_packet (pkt, &parsectx);
- init_packet(pkt);
- continue;
- }
- in_v3key = 0;
+ if (in_v3key && !(pkt->pkttype == PKT_PUBLIC_KEY
+ || pkt->pkttype == PKT_SECRET_KEY))
+ {
+ free_packet (pkt, &parsectx);
+ init_packet(pkt);
+ continue;
+ }
+ in_v3key = 0;
- if (!root && pkt->pkttype == PKT_SIGNATURE
- && IS_KEY_REV (pkt->pkt.signature) )
- {
- /* This is a revocation certificate which is handled in a
- * special way. */
- root = new_kbnode( pkt );
- pkt = NULL;
- goto ready;
- }
+ if (!root && pkt->pkttype == PKT_SIGNATURE
+ && IS_KEY_REV (pkt->pkt.signature) )
+ {
+ /* This is a revocation certificate which is handled in a
+ * special way. */
+ root = new_kbnode( pkt );
+ pkt = NULL;
+ goto ready;
+ }
- /* Make a linked list of all packets. */
- switch (pkt->pkttype)
- {
- case PKT_COMPRESSED:
- if (check_compress_algo (pkt->pkt.compressed->algorithm))
- {
- rc = GPG_ERR_COMPR_ALGO;
- goto ready;
- }
- else
- {
- compress_filter_context_t *cfx = xmalloc_clear( sizeof *cfx );
- pkt->pkt.compressed->buf = NULL;
- if (push_compress_filter2 (a, cfx,
- pkt->pkt.compressed->algorithm, 1))
- xfree (cfx); /* e.g. in case of compression_algo NONE. */
- }
- free_packet (pkt, &parsectx);
- init_packet(pkt);
- break;
+ /* Make a linked list of all packets. */
+ switch (pkt->pkttype)
+ {
+ case PKT_COMPRESSED:
+ if (check_compress_algo (pkt->pkt.compressed->algorithm))
+ {
+ rc = GPG_ERR_COMPR_ALGO;
+ goto ready;
+ }
+ else
+ {
+ compress_filter_context_t *cfx = xmalloc_clear( sizeof *cfx );
+ pkt->pkt.compressed->buf = NULL;
+ if (push_compress_filter2 (a, cfx,
+ pkt->pkt.compressed->algorithm, 1))
+ xfree (cfx); /* e.g. in case of compression_algo NONE. */
+ }
+ free_packet (pkt, &parsectx);
+ init_packet(pkt);
+ break;
- case PKT_RING_TRUST:
- /* Skip those packets unless we are in restore mode. */
- if ((opt.import_options & IMPORT_RESTORE))
- goto x_default;
- free_packet (pkt, &parsectx);
- init_packet(pkt);
- break;
+ case PKT_RING_TRUST:
+ /* Skip those packets unless we are in restore mode. */
+ if ((opt.import_options & IMPORT_RESTORE))
+ goto x_default;
+ free_packet (pkt, &parsectx);
+ init_packet(pkt);
+ break;
- case PKT_PUBLIC_KEY:
- case PKT_SECRET_KEY:
- if (in_cert ) /* Store this packet. */
- {
- *pending_pkt = pkt;
- pkt = NULL;
- goto ready;
- }
- in_cert = 1; /* fall through */
- default:
- x_default:
- if (in_cert && valid_keyblock_packet (pkt->pkttype))
- {
- if (!root )
- root = new_kbnode (pkt);
- else
- add_kbnode (root, new_kbnode (pkt));
- pkt = xmalloc (sizeof *pkt);
- }
- init_packet(pkt);
- break;
- }
+ case PKT_PUBLIC_KEY:
+ case PKT_SECRET_KEY:
+ if (in_cert ) /* Store this packet. */
+ {
+ *pending_pkt = pkt;
+ pkt = NULL;
+ goto ready;
+ }
+ in_cert = 1;
+ /* fall through */
+ default:
+ x_default:
+ if (in_cert && valid_keyblock_packet (pkt->pkttype))
+ {
+ if (!root )
+ root = new_kbnode (pkt);
+ else
+ add_kbnode (root, new_kbnode (pkt));
+ pkt = xmalloc (sizeof *pkt);
+ }
+ init_packet(pkt);
+ break;
+ }
}
ready: