From eb3e3a762c5581a421c3a305eda186aec213b360 Mon Sep 17 00:00:00 2001 From: job Date: Tue, 13 Feb 2024 20:40:17 +0000 Subject: [PATCH] Improve printing of TALs extracted from .tak objects This changeset makes the output align more with the TAL file syntax. OK tb@ --- usr.sbin/rpki-client/print.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpki-client/print.c b/usr.sbin/rpki-client/print.c index 3649c6bf12b..bbd478ce6ea 100644 --- a/usr.sbin/rpki-client/print.c +++ b/usr.sbin/rpki-client/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.47 2024/02/13 20:36:42 job Exp $ */ +/* $OpenBSD: print.c,v 1.48 2024/02/13 20:40:17 job Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -697,9 +697,11 @@ takey_print(char *name, const struct takey *t) for (i = 0; i < t->commentsz; i++) printf("\t# %s\n", t->comments[i]); - printf("\n"); + if (t->commentsz > 0) + printf("\n"); for (i = 0; i < t->urisz; i++) - printf("\t%s\n\t", t->uris[i]); + printf("\t%s\n", t->uris[i]); + printf("\n\t"); for (i = 0; i < strlen(spki); i++) { printf("%c", spki[i]); if ((++j % 64) == 0) -- 2.20.1