From: job Date: Thu, 14 Jul 2022 13:24:56 +0000 (+0000) Subject: Fix JSON output in filemode for TALs X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3b3f075aeaff569c28bd0de352a4c064102228ce;p=openbsd Fix JSON output in filemode for TALs OK claudio@ --- diff --git a/usr.sbin/rpki-client/print.c b/usr.sbin/rpki-client/print.c index a625f2f151e..7f7bbb4b6dc 100644 --- a/usr.sbin/rpki-client/print.c +++ b/usr.sbin/rpki-client/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.13 2022/05/15 16:43:34 tb Exp $ */ +/* $OpenBSD: print.c,v 1.14 2022/07/14 13:24:56 job Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -91,15 +91,15 @@ tal_print(const struct tal *p) if (outformats & FORMAT_JSON) { printf("\t\"type\": \"tal\",\n"); - printf("\t\"name\": %s\n", p->descr); - printf("\t\"ski\": %s\n", pretty_key_id(ski)); + printf("\t\"name\": \"%s\",\n", p->descr); + printf("\t\"ski\": \"%s\",\n", pretty_key_id(ski)); printf("\t\"trust_anchor_locations\": ["); for (i = 0; i < p->urisz; i++) { printf("\"%s\"", p->uri[i]); if (i + 1 < p->urisz) printf(", "); } - printf("]\n"); + printf("],\n"); } else { printf("Trust anchor name: %s\n", p->descr); printf("Subject key identifier: %s\n", pretty_key_id(ski));