From 96f04ada4300c65e14013daae2dc529d09f42cb1 Mon Sep 17 00:00:00 2001 From: "pavel.uhanov" <pavel.uhanov@demlabs.net> Date: Mon, 16 Dec 2024 13:23:06 +0300 Subject: [PATCH] [*] add full pkey in node tool show command --- cellframe-sdk | 2 +- sources/main_node_tool.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cellframe-sdk b/cellframe-sdk index 6d171b267..c87ad0317 160000 --- a/cellframe-sdk +++ b/cellframe-sdk @@ -1 +1 @@ -Subproject commit 6d171b26714aa3ee86f4fed3c14df4d760a39c1b +Subproject commit c87ad031775e562f54ee9d071343e0f9e927676f diff --git a/sources/main_node_tool.c b/sources/main_node_tool.c index 7c9b4aad9..8a715e490 100644 --- a/sources/main_node_tool.c +++ b/sources/main_node_tool.c @@ -594,7 +594,10 @@ static int s_cert_pkey_show(int argc, const char **argv) printf("Can't serialize cert %s", argv[4]); exit(-135); } - printf("%s\n", dap_chain_hash_fast_to_str_static(&l_hash)); + + char *l_pkey_str = dap_cert_get_pkey_str(l_cert, "hex"); + printf("hash: %s\npkey: %s\n", dap_chain_hash_fast_to_str_static(&l_hash), l_pkey_str); + DAP_DELETE(l_pkey_str); return 0; } @@ -615,7 +618,9 @@ static int s_wallet_pkey_show(int argc, const char **argv) printf("Can't serialize wallet %s", argv[4]); exit(-135); } - printf("%s\n", dap_chain_hash_fast_to_str_static(&l_hash)); + char *l_pkey_str = dap_chain_wallet_get_pkey_str(l_wallet, "hex"); + printf("hash: %s\npkey: %s\n", dap_chain_hash_fast_to_str_static(&l_hash), l_pkey_str); + DAP_DELETE(l_pkey_str); return 0; } -- GitLab