[chainmaker][#436]add chain_id host_name and org_id
@@ -27,15 +27,21 @@ static BOAT_RESULT chainmakerWalletPrepare(void)
wallet_config.user_prikey_cfg.prikey_genMode = BOAT_WALLET_PRIKEY_GENMODE_EXTERNAL_INJECTION;
wallet_config.user_prikey_cfg.prikey_type = BOAT_WALLET_PRIKEY_TYPE_SECP256R1;
wallet_config.user_prikey_cfg.prikey_format = BOAT_WALLET_PRIKEY_FORMAT_PKCS;
- wallet_config.user_prikey_cfg.prikey_content.field_ptr = (BUINT8 *)chainmaker_key_ptr_buf;
- wallet_config.user_prikey_cfg.prikey_content.field_len = strlen(chainmaker_key_ptr_buf) + 1;
+ wallet_config.user_prikey_cfg.prikey_content.field_ptr = (BUINT8 *)chainmaker_sign_key_buf;
+ wallet_config.user_prikey_cfg.prikey_content.field_len = strlen(chainmaker_sign_key_buf) + 1;
//set user cert context
- wallet_config.user_cert_cfg.length = strlen(chainmaker_cert_ptr_buf);
- memcpy(wallet_config.user_cert_cfg.content, chainmaker_cert_ptr_buf, wallet_config.user_cert_cfg.length);
- strncpy(wallet_config.node_url_cfg, TEST_CHAINMAKER_NODE_URL, strlen(TEST_CHAINMAKER_NODE_URL));
+ wallet_config.user_cert_cfg.length = strlen(chainmaker_sign_cert_buf);
+ memcpy(wallet_config.user_cert_cfg.content, chainmaker_sign_cert_buf, wallet_config.user_cert_cfg.length);
+ //tls ca cert
+ wallet_config.tls_ca_cert_cfg.length = strlen(chainmaker_ca_cert_buf) + 1;
+ memcpy(wallet_config.tls_ca_cert_cfg.content, chainmaker_ca_cert_buf, wallet_config.tls_ca_cert_cfg.length);
+ strncpy(wallet_config.node_url_cfg, TEST_CHAINMAKER_NODE_URL, strlen(TEST_CHAINMAKER_NODE_URL));
+ strncpy(wallet_config.host_name_cfg, TEST_CHAINMAKER_HOST_NAME, strlen(TEST_CHAINMAKER_HOST_NAME));
+ strncpy(wallet_config.chain_id_cfg, TEST_CHAINMAKER_CHAIN_ID, strlen(TEST_CHAINMAKER_CHAIN_ID));
+ strncpy(wallet_config.org_id_cfg, TEST_CHAINMAKER_ORG_ID, strlen(TEST_CHAINMAKER_ORG_ID));
// create wallet
#if defined(USE_ONETIME_WALLET)
index = BoatWalletCreate(BOAT_PROTOCOL_CHAINMAKER, NULL, &wallet_config, sizeof(BoatHlchainmakerWalletConfig));
