Skip to content

Commit 774b034

Browse files
hreineckeigaw
authored andcommitted
json: dump TLS key data in PSK interchange format
Dump the TLS key data in PSK interchange format, too, to be consistent with all other functions. Signed-off-by: Hannes Reinecke <[email protected]>
1 parent d027f68 commit 774b034

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/nvme/json.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,13 @@ static void json_dump_ctrl(struct json_object *ctrl_array, nvme_ctrl_t c)
554554
JSON_BOOL_OPTION(cfg, ctrl_obj, disable_sqflow);
555555
JSON_BOOL_OPTION(cfg, ctrl_obj, hdr_digest);
556556
JSON_BOOL_OPTION(cfg, ctrl_obj, data_digest);
557-
JSON_BOOL_OPTION(cfg, ctrl_obj, tls);
557+
if (!strcmp(transport, "tcp")) {
558+
JSON_BOOL_OPTION(cfg, ctrl_obj, tls);
559+
560+
if (cfg->tls_key)
561+
json_export_nvme_tls_key(cfg->keyring, cfg->tls_key,
562+
ctrl_obj);
563+
}
558564
JSON_BOOL_OPTION(cfg, ctrl_obj, concat);
559565
if (nvme_ctrl_is_persistent(c))
560566
json_object_object_add(ctrl_obj, "persistent",

0 commit comments

Comments
 (0)