diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 306f38a56e04f53fe3a62e426ce1a56ea0a0c9ab..98cb0af634e72e0155fe989ffd65cd3cbaa9f1d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,4 +99,4 @@ cellframe-dashboard_update: - master tags: - cellframe-node - script: ~/production-docker/integration/gitlab-CI/update_dashboard.sh \ No newline at end of file + script: ~/production-docker/integration/gitlab-CI/update_dashboard.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index c8c3099ad97f6ce07d26550aa380171fe494c409..012aef54d3ecc4ebef7d8d6f0676e6ac1bcb5761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ project(cellframe-node C) -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_COLOR_MAKEFILE ON) set(CMAKE_C_STANDARD 11) @@ -8,7 +8,8 @@ set(CMAKE_C_STANDARD 11) SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}") SET( CPACK_PACKAGE_VERSION_MAJOR 5) SET( CPACK_PACKAGE_VERSION_MINOR 1) -SET( CPACK_PACKAGE_VERSION_PATCH 0) +SET( CPACK_PACKAGE_VERSION_PATCH 1) + if (CMAKE_TARGET_ARCH MATCHES arm) SET( CPACK_PACKAGE_ARCHITECTURE "${CMAKE_TARGET_ARCH}") SET( CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CMAKE_TARGET_ARCH}") diff --git a/README.md b/README.md index bd343f782347f76853886cdcb7d3ac3cbeab9006..c1a18eb9f19f153ccff97839469f2d00f0a4584e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # cellframe-node -Cellframe Node - -[Cellframe Node usage Wiki](https://wiki.cellframe.net/index.php/Node_usage) +[Cellframe Node usage Wiki](https://wiki.cellframe.net/en/soft) ## This guide will work on Debian/Ubuntu @@ -40,15 +38,7 @@ Generaly thats all what you need This command fetch sources from gitlab and build them. ``` - git clone https://gitlab.demlabs.net/cellframe/cellframe-node.git - cd cellframe-node - git submodule update --init - cd cellframe-sdk - git submodule update --init - cd ../ - cd python-cellframe - git submodule update --init - cd ../ + git clone https://gitlab.demlabs.net/cellframe/cellframe-node.git --recursive ``` #### Build cellframe using cmake framework @@ -69,11 +59,11 @@ Right now you can't, just type ```make install``` and it will install all the fi Use the following command ```cpack``` from the build directory to create cellframe-node installation package. ##### Install from local package -If everyting went well you should be able to find the following file in your build folder ```cellframe-node-2.14-9-Debian-10-amd64-buster.deb``` +If everyting went well you should be able to find the following file in your build folder ```cellframe-node-5.0-8-Debian-21.10-amd64-impish-dbg.deb``` Please use ```dpkg``` command to install it: ``` -sudo dpkg -i ./cellframe-node_2.11-4-buster_amd64.deb +sudo dpkg -i ./cellframe-node-5.0-8-Debian-21.10-amd64-impish-dbg.deb ``` In some cases there is a following command required to be executed @@ -85,6 +75,10 @@ sudo apt --fix-broken install * Create file /etc/apt/sources.list.d/demlabs.list with command ```sudo nano /etc/apt/sources.list.d/demlabs.list``` with one line below +* For Debian 11: + ``` + deb https://debian.pub.demlabs.net/public bullseye main + ``` * For Debian 10: ``` deb https://debian.pub.demlabs.net/public buster main @@ -141,7 +135,10 @@ Select node type (or node role) from suggested list with short descriptions. By * Kelvin-testnet: Enable network Set ```true``` if you want to connect your node with ```kelvin-testnet``` -* Kelvin-testnet: Node type (role) +* SubZero: Enable network +Set ```true``` if you want to connect your node with ```subzero``` + +* SubZero: Node role Select node type (or node role) from suggested list with short descriptions. By default suggested to select ```full``` ### How to configure VPN service share @@ -205,9 +202,8 @@ sudo apt-get install arno-iptables-firewall ``` It would ask next questions: -* `External network interfaces` answer with you network interface thats used for internet access. Usually its `eth0` or `wifi0` but could be different, examine you network configuration first * `Do you want to manage the firewall setup with debconf` answer `Yes` -* `External network interfaces` answer `tun0` if you haven't configured any other VPN servers. If they are - find what the tunnel number is biggest and list all of them here with your tunnel name (`tun<max number plus 1>` ) +* `External network interfaces` answer with you network interface thats used for internet access. Usually its `eth0` or `wifi0` but could be different, examine you network configuration first. * `Open external TCP-ports` answer `8079` or what the port do you configured for cellframe node when it was installed * `Open external UDP-ports:` answer same as in previous * `Internal network interfaces` answer `tun0` if you haven't configured any other VPN servers. If they are - find what the tunnel number is biggest and list all of them here with your tunnel name (`tun<max number plus 1>` ) @@ -294,6 +290,76 @@ Important: if you set price in configs for units set, 3600 in our example - here More details about order operations you could find with call ```sudo /opt/cellframe-node/bin/cellframe-node-cli help net_srv``` More details about cellframe node commands in call ```sudo /opt/cellframe-node/bin/cellframe-node-cli help``` +# SubZero testnet + +## Create wallet and token request + +1. Install node according instructions above. +2. Create wallet + +``` + cellframe-node-cli wallet new -w subzero_wallet + Wallet 'subzero_wallet' (type=sig_dil) successfully created +``` + +3. Get wallet address: + +``` +cellframe-node-cli wallet info -w subzero_wallet -net subzero +addr: mJUUJk6Yk2gBSTjcDHXxAerggncSK7DP8ZViVG2zrtbuW6uiCtTvXXn9kdcoBadGeBiujC7VsfemGv5BLbq2zcxoCR8GVRKfCmLtaedd +network: subzero +balance: 0 +``` + +4. Send wallet address and request for tCELL amount of money to telegram channel: t.me/cellframe_dev_en +5. Waiting for answer from admin and execute command for network chains and gdb syncronization: + +```cellframe-node-cli net sync all -net subzero``` + +6. See wallet balance: + +``` +cellframe-node-cli wallet info -w subzero_wallet -net subzero +wallet: subzero_wallet +addr: mJUUJk6Yk2gBSTjcDHXxAerggncSK7DP8ZViVG2zrtbuW6uiCtTvXXn9kdcoBadGeBiujC7VsfemGv5BLbq2zcxoCR8GVRKfCmLtaedd +network: subzero +balance: + 5500000.000000000 (5500000000000000) tCELL +``` + +## Balance replenishment + +If you want increase amount of tCell on your wallet, you can wrote about it to SubZero admin. + +## Tokens transfer + +1. You can transfer tokens from your wallet to other wallet. For doing this you need to know address of 2nd wallet. Execute command + +``` +cellframe-node-cli tx_create -net subzero -chain support -from_wallet subzero_wallet -to_addr rTDbDdeStfpodpLUevvYaxJBh2k739fjwusqtmAU72VoUCm88ERPw555jHXtrkoEGJfYEZ7Mmwssc3ajijG9eEqEZxV2FmZvYcvnAVZz -value 32100000 + transfer=Ok + tx_hash=0x4E6D540F86CD46CBFA551F219A04BA2248FF474BB795EB5B2C524299458AD709 +``` + +- to_addr - address of 2nd wallet (you can see it using command ```cellframe-node-cli wallet info -w <wallet_name> -net subzero ```) +- value - amount of tokens + +2. Execute command for database syncing + +```cellframe-node-cli net sync all -net subzero``` + +3. Waiting for a while root node have processed you request +4. Don't create more then one request on balance changing, until you get confirmation about processing current request. That requests will not be processed (it can be fixed in future) + +and see your updated balance + +```cellframe-node-cli wallet info -w subzero_wallet -net subzero``` + +# Node notes + +1. Token declaration operations, executing on node client (token_decl command) will be approved manually. +2. Token emission operations (token_emit command) will be processing automatically only for token owners. +3. Transactions (tx_create command) will be automatically processing as usual. #### Remove cellframe-node diff --git a/cellframe-sdk b/cellframe-sdk index 90adbaf559f626f37a75f01f8f6c1dffc2ef1954..6b9e05e2fcfbdcfb3814ddb13c36ba4e3688603a 160000 --- a/cellframe-sdk +++ b/cellframe-sdk @@ -1 +1 @@ -Subproject commit 90adbaf559f626f37a75f01f8f6c1dffc2ef1954 +Subproject commit 6b9e05e2fcfbdcfb3814ddb13c36ba4e3688603a diff --git a/dist.darwin/etc/network/subzero/chain-0.cfg b/dist.darwin/etc/network/subzero/chain-0.cfg index a58fe5d1b08c130391ad8ca2c8eda0c1507b1285..7a26761acea1de9dcc6e0b2f273d616fd5dc92f9 100644 --- a/dist.darwin/etc/network/subzero/chain-0.cfg +++ b/dist.darwin/etc/network/subzero/chain-0.cfg @@ -4,8 +4,8 @@ shard_id=0x0000000000000000 name=zerochain load_priority=1 # Possible values [token, emission, transaction] -datum_types=[token,emission,shard,ca,transaction] -mempool_auto_types=[all] +datum_types=[token,emission,ca,transaction] +mempool_auto_types=[emission,ca,transaction] consensus=dag_poa [files] diff --git a/dist.darwin/etc/network/subzero/support-chain.cfg b/dist.darwin/etc/network/subzero/support-chain.cfg index f71f50f5bdead9c6da461e5d5374c8e0562fe7d3..8147229a205a461eea2207255ae5767bf1619460 100644 --- a/dist.darwin/etc/network/subzero/support-chain.cfg +++ b/dist.darwin/etc/network/subzero/support-chain.cfg @@ -4,12 +4,12 @@ shard_id=0x0000000000000000 name=support load_priority=1 # Possible values [token, emission, transaction] -datum_types=[token,emission,shard,ca,transaction] -mempool_auto_types=[emission,transaction] +datum_types=[ca,transaction] +mempool_auto_types=[transaction] consensus=dag_poa [files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/subzero/zerochain/ +storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/subzero/support/ [dag] is_single_line=true @@ -18,7 +18,7 @@ is_add_directly=true datum_add_hashes_count=1 is_static_genesis_event=true -static_genesis_event=0xA2A605B6B147A07AB057F6F1304DCFB7387703F15845B5957FB9E390F9507893 +static_genesis_event=0x53587B7B6D1E1234005DC1053A5A3C8CA1FA496560A8BB91D4D99BBB83F0C1B2 [dag-poa] auth_certs_prefix=subzero.cellframe.root diff --git a/dist.linux/etc/network/subzero/chain-0.cfg b/dist.linux/etc/network/subzero/chain-0.cfg index d0d1d082ebc2d7cb4ba7b6474fe43882f46cf948..43eeb1d8bf6232e43ea437687282d6104e722121 100644 --- a/dist.linux/etc/network/subzero/chain-0.cfg +++ b/dist.linux/etc/network/subzero/chain-0.cfg @@ -3,9 +3,9 @@ id=0x0000000000000000 shard_id=0x0000000000000000 name=zerochain load_priority=1 -# Possible values [token, emission, transaction] -datum_types=[token,emission,shard,ca,transaction] -mempool_auto_types=[all] +# Possible values [token, emission, transaction, ca] +datum_types=[token,emission,ca,transaction] +mempool_auto_types=[emission,ca,transaction] consensus=dag_poa [files] diff --git a/dist.linux/etc/network/subzero/support-chain.cfg b/dist.linux/etc/network/subzero/support-chain.cfg index 8be23cdce365989294539f4ddb6cb49ea37b159e..8d544c5fe417db3dda1545be8ef8419d70fcef95 100644 --- a/dist.linux/etc/network/subzero/support-chain.cfg +++ b/dist.linux/etc/network/subzero/support-chain.cfg @@ -3,13 +3,13 @@ id=0x0000000000000001 shard_id=0x0000000000000000 name=support load_priority=1 -# Possible values [token, emission, transaction] -datum_types=[token,emission,shard,ca,transaction,signer] -mempool_auto_types=[emission,transaction] +# Possible values [token, emission, transaction, ca, signer] +datum_types=[ca,transaction,signer] +mempool_auto_types=[transaction] consensus=dag_poa [files] -storage_dir=/opt/cellframe-node/var/lib/network/subzero/zerochain/ +storage_dir=/opt/cellframe-node/var/lib/network/subzero/support/ [dag] is_single_line=true @@ -18,7 +18,7 @@ is_add_directly=true datum_add_hashes_count=1 is_static_genesis_event=true -static_genesis_event=0xA2A605B6B147A07AB057F6F1304DCFB7387703F15845B5957FB9E390F9507893 +static_genesis_event=0x53587B7B6D1E1234005DC1053A5A3C8CA1FA496560A8BB91D4D99BBB83F0C1B2 [dag-poa] auth_certs_prefix=subzero.cellframe.root diff --git a/python-cellframe b/python-cellframe index 37c95060177e9d6822756ed9667c24f240a0208a..a0f41498fc6b38759ebcef3a5755a1eeb1639364 160000 --- a/python-cellframe +++ b/python-cellframe @@ -1 +1 @@ -Subproject commit 37c95060177e9d6822756ed9667c24f240a0208a +Subproject commit a0f41498fc6b38759ebcef3a5755a1eeb1639364 diff --git a/sources/main.c b/sources/main.c index 93f3cdcdfd4b1dbce89f4ce7c4a48d9d7bfcef44..3bb89deaae6fc297a0ecb553362d2de4ecbd6e02 100755 --- a/sources/main.c +++ b/sources/main.c @@ -369,6 +369,14 @@ int main( int argc, const char **argv ) return -66; } + if (!dap_chain_net_srv_xchange_init()) { + log_it(L_ERROR, "Can't provide exchange capability"); + } + + if (!dap_chain_net_srv_stake_init()) { + log_it(L_ERROR, "Can't start delegated stake service"); + } + if( dap_chain_net_srv_app_init() !=0){ log_it(L_CRITICAL,"Can't init dap chain network service applications module"); return -67; diff --git a/sources/main_node_tool.c b/sources/main_node_tool.c index 0eed2f74682755b87ad14051bfa12c4c8d0bf369..25ae9dfcf67039d1c4141a33143bbb7da71128f2 100644 --- a/sources/main_node_tool.c +++ b/sources/main_node_tool.c @@ -111,6 +111,7 @@ static int s_is_file_available (char *l_path, const char *name, const char *ext) static void s_fill_hash_key_for_data(dap_enc_key_t *key, void *data); static char s_system_ca_dir[MAX_PATH]; +static char s_system_wallet_dir[MAX_PATH]; #ifdef __ANDROID__ int cellframe_node_tool_Main(int argc, const char **argv) @@ -143,21 +144,14 @@ int main(int argc, const char **argv) if ( strcmp( argv[2],"create") == 0 ) { // wallet create <network name> <wallet name> <wallet_sign> - if ( argc < 6 ) { + if ( argc < 5 ) { log_it( L_ERROR, "Wrong 'wallet create' command params" ); s_help( ); exit( -2003 ); } - /*dap_chain_net_id_t l_network_id = dap_chain_net_id_by_name( argv[3] ); - if ( !l_network_id.raw ) { - log_it( L_ERROR, "No such network name '%s'", argv[3] ); - s_help() ; - exit( -2005 ); - }*/ - - const char *l_wallet_name = argv[4]; - dap_sign_type_t l_sig_type = dap_sign_type_from_str( argv[5] ); + const char *l_wallet_name = argv[3]; + dap_sign_type_t l_sig_type = dap_sign_type_from_str( argv[4] ); dap_chain_wallet_t *l_wallet = NULL; if ( l_sig_type.type == SIG_TYPE_NULL ) { @@ -165,7 +159,7 @@ int main(int argc, const char **argv) s_help( ); exit( -2004 ); } - l_wallet = dap_chain_wallet_create(l_wallet_name, dap_config_get_item_str(g_config, "resources", "wallets_path"), l_sig_type); + l_wallet = dap_chain_wallet_create(l_wallet_name, s_system_wallet_dir, l_sig_type); } else if ( strcmp( argv[2],"sign_file") == 0 ) { // wallet sign_file <wallet name> <cert index> <data file path> <data offset> <data length> <dsign file path> @@ -174,7 +168,7 @@ int main(int argc, const char **argv) s_help(); exit(-3000); } - dap_chain_wallet_t *l_wallet = dap_chain_wallet_open(argv[3], dap_config_get_item_str(g_config, "resources", "wallets_path")); + dap_chain_wallet_t *l_wallet = dap_chain_wallet_open(argv[3], s_system_wallet_dir); if ( !l_wallet ) { log_it(L_ERROR,"Can't open wallet \"%s\"",argv[3]); s_help(); @@ -187,7 +181,7 @@ int main(int argc, const char **argv) if ( (l_cert_index > 0) && (l_wallet_certs_number > (size_t)l_cert_index) ) { FILE *l_data_file = fopen( argv[5],"rb" ); if ( l_data_file ) {} - } + } else { log_it( L_ERROR, "Cert index %d can't be found in wallet with %zu certs inside" ,l_cert_index,l_wallet_certs_number ); @@ -195,26 +189,6 @@ int main(int argc, const char **argv) exit( -3002 ); } } - /* if ( strcmp( argv[2],"create_from") == 0 ){ - }else if ( argc >=7){ - // wallet create_from <wallet name> from <wallet ca1> [<wallet ca2> ...<wallet caN>] - dap_cert_t ** l_wallet_cert = NULL; - size_t l_wallet_cert_size = 0; - l_wallet_cert_size = (argc - 3 ) - l_wallet_cert = DAP_NEW_Z_SIZE (dap_cert_t*, l_wallet_cert_size ); - }else { - log_it(L_ERROR,"Wrong 'wallet create_from' command params"); - s_help(); - exit(-2002); - } - - if ( l_wallet_cert ){ - if (l_wallet_cert_size > 0) - for (size_t i = 0; i < l_wallet_cert_size; i++) - dap_cert_delete( l_wallet_cert[i]->); - } - - }*/ } // wallet else if (strcmp (argv[1],"cert") == 0 ) { if ( argc >=3 ) { @@ -418,78 +392,20 @@ static int s_init( int argc, const char **argv ) #elif DAP_OS_UNIX g_sys_dir_path = dap_strdup_printf("/opt/%s", dap_get_appname()); #endif - char * s_log_dir_path = dap_strdup_printf("%s/var/log", g_sys_dir_path) ; - char * s_log_file_path = dap_strdup_printf("%s/%s.log",s_log_dir_path, dap_get_appname()); - if (dap_common_init(dap_get_appname(), s_log_file_path, s_log_dir_path ) != 0) { - printf("Fatal Error: Can't init common functions module"); - return -2; - } - - { - char l_config_dir[MAX_PATH] = {'\0'}; - dap_sprintf(l_config_dir, "%s/etc", g_sys_dir_path); - dap_config_init(l_config_dir); - } - dap_log_level_set(L_CRITICAL); - - if((g_config = dap_config_open(dap_get_appname())) == NULL) { - printf("Can't init general configurations %s.cfg\n", dap_get_appname()); - exit(-1); - } - - if ( dap_chain_init() != 0 ) { - log_it( L_ERROR, "Can't chain module" ); - return -3; - } - - if ( dap_cert_init() != 0 ) { - log_it( L_ERROR, "Can't chain certificate storage module" ); - return -4; - } - - if ( dap_chain_wallet_init() != 0 ) { - log_it( L_ERROR, "Can't chain wallet storage module" ); - return -5; - } - - /* if ( dap_server_init(0) != 0 ) { - log_it( L_ERROR, "Can't server module" ); - return -6; - } - - if ( dap_stream_init(false) != 0 ) { - log_it( L_ERROR, "Can't init stream module" ); - return -7; - } - - if ( dap_stream_ch_init() != 0 ) { - log_it( L_ERROR, "Can't init stream ch module" ); - return -8; - } - - if ( dap_stream_ch_chain_init() != 0 ) { - log_it( L_ERROR, "Can't init stream ch chain module" ); - return -9; + char l_config_dir[MAX_PATH] = {'\0'}; + dap_sprintf(l_config_dir, "%s/etc", g_sys_dir_path); + dap_config_init(l_config_dir); + g_config = dap_config_open(dap_get_appname()); + if (g_config) { + uint16_t l_ca_folders_size = 0; + char **l_ca_folders = dap_config_get_array_str(g_config, "resources", "ca_folders", &l_ca_folders_size); + dap_stpcpy(s_system_ca_dir, l_ca_folders[0]); + const char *l_wallet_folder = dap_config_get_item_str(g_config, "resources", "wallets_path"); + dap_stpcpy(s_system_wallet_dir, l_wallet_folder); + } else { + dap_stpcpy(s_system_ca_dir, "./"); + dap_stpcpy(s_system_wallet_dir, "./"); } - - if ( dap_stream_ch_chain_net_init() != 0 ) { - log_it( L_ERROR, "Can't init stream ch chain net module" ); - return -10; - } - - if ( dap_stream_ch_chain_net_srv_init() != 0 ) { - log_it( L_ERROR, "Can't init stream ch chain net srv module" ); - return -11; - } - - if ( dap_client_init() != 0 ) { - log_it( L_ERROR, "Can't chain wallet storage module" ); - return -12; - } */ - - uint16_t l_ca_folders_size = 0; - char **l_ca_folders = dap_config_get_array_str(g_config, "resources", "ca_folders", &l_ca_folders_size); - dap_stpcpy(s_system_ca_dir, l_ca_folders[0]);//memcpy(s_system_ca_dir, l_ca_folders[0], strlen(l_ca_folders[0])); return 0; } @@ -553,36 +469,38 @@ static void s_fill_hash_key_for_data(dap_enc_key_t *l_key, void *l_data) static void s_help() { #ifdef _WIN32 - SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 ); + SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 ); #endif + char *l_tool_appname = dap_strdup_printf("%s-tool", dap_get_appname()); + printf( "\n" ); + printf( "%s usage:\n\n", l_tool_appname); - printf( "\n" ); - printf( "%s usage:\n\n", dap_get_appname() ); + printf(" * Create new key wallet and generate signatures with same names plus index \n" ); + printf("\t%s wallet create <network name> <wallet name> <signature type> [<signature type 2>[...<signature type N>]]\n\n", l_tool_appname); - printf(" * Create new key wallet and generate signatures with same names plus index \n" ); - printf("\t%s wallet create <network name> <wallet name> <signature type> [<signature type 2>[...<signature type N>]]\n\n", dap_get_appname() ); + printf(" * Create new key wallet from existent certificates in the system\n"); + printf("\t%s wallet create_from <network name> <wallet name> <wallet ca1> [<wallet ca2> [...<wallet caN>]]\n\n", l_tool_appname); - printf(" * Create new key wallet from existent certificates in the system\n"); - printf("\t%s wallet create_from <network name> <wallet name> <wallet ca1> [<wallet ca2> [...<wallet caN>]]\n\n", dap_get_appname() ); + printf(" * Create new key file with randomly produced key stored in\n"); + printf("\t%s cert create <cert name> <key type> [<key length>]\n\n", l_tool_appname); - printf(" * Create new key file with randomly produced key stored in\n"); - printf("\t%s cert create <cert name> <key type> [<key length>]\n\n", dap_get_appname() ); + printf(" * Dump cert data stored in <file path>\n"); + printf("\t%s cert dump <cert name>\n\n", l_tool_appname); - printf(" * Dump cert data stored in <file path>\n"); - printf("\t%s cert dump <cert name>\n\n", dap_get_appname() ); + printf(" * Sign some data with cert \n"); + printf("\t%s cert sign <cert name> <data file path> <sign file output> [<sign data length>] [<sign data offset>]\n\n", l_tool_appname); - printf(" * Sign some data with cert \n"); - printf("\t%s cert sign <cert name> <data file path> <sign file output> [<sign data length>] [<sign data offset>]\n\n", dap_get_appname() ); + printf(" * Create pkey from <cert name> and store it on <pkey path>\n"); + printf("\t%s cert create_pkey <cert name> <pkey path>\n\n", l_tool_appname); - printf(" * Create pkey from <cert name> and store it on <pkey path>\n"); - printf("\t%s cert create_pkey <cert name> <pkey path>\n\n", dap_get_appname() ); + printf(" * Export only public key from <cert name> and stores it \n"); + printf("\t%s cert create_cert_pkey <cert name> <new cert name>\n\n", l_tool_appname); - printf(" * Export only public key from <cert name> and stores it \n"); - printf("\t%s cert create_cert_pkey <cert name> <new cert name>\n\n",dap_get_appname()); + printf(" * Print hash of cert <cert name>\n"); + printf("\t%s cert pkey show <cert name>\n\n", l_tool_appname); - printf(" * Add metadata item to <cert name>\n"); - printf("\t%s cert add_metadata <cert name> <key:type:length:value>\n\n",dap_get_appname()); + printf(" * Add metadata item to <cert name>\n"); + printf("\t%s cert add_metadata <cert name> <key:type:length:value>\n\n", l_tool_appname); - printf(" * Print hash of cert <cert name>\n"); - printf("\t%s cert pkey show <cert name>\n\n",dap_get_appname()); + DAP_DELETE(l_tool_appname); }