Skip to content
Snippets Groups Projects
Commit fa15bd3c authored by Roman Khlopkov's avatar Roman Khlopkov 🔜
Browse files

Merge branch 'hotfix-15787_d' into 'develop'

Hotfix 15787 d

See merge request !507
parents 017b93b0 f87b95cd
1 merge request!507Hotfix 15787 d
Pipeline #51409 passed with stage
in 40 minutes and 51 seconds
......@@ -621,21 +621,21 @@ void dap_sign_get_information(dap_sign_t* a_sign, dap_string_t *a_str_out, const
*/
void dap_sign_get_information_json(json_object* a_json_arr_reply, dap_sign_t* a_sign, json_object *a_json_out, const char *a_hash_out_type)
{
json_object_object_add(a_json_out,"Signature", json_object_new_string(""));
json_object_object_add(a_json_out,"signature", json_object_new_string(""));
if (!a_sign) {
dap_json_rpc_error_add(a_json_arr_reply, -1, "Corrupted signature data");
return;
}
dap_chain_hash_fast_t l_hash_pkey;
json_object_object_add(a_json_out,"Type",json_object_new_string(dap_sign_type_to_str(a_sign->header.type)));
json_object_object_add(a_json_out,"type",json_object_new_string(dap_sign_type_to_str(a_sign->header.type)));
if(dap_sign_get_pkey_hash(a_sign, &l_hash_pkey)) {
const char *l_hash_str = dap_strcmp(a_hash_out_type, "hex")
? dap_enc_base58_encode_hash_to_str_static(&l_hash_pkey)
: dap_chain_hash_fast_to_str_static(&l_hash_pkey);
json_object_object_add(a_json_out,"Public key hash",json_object_new_string(l_hash_str));
json_object_object_add(a_json_out,"public_key_hash",json_object_new_string(l_hash_str));
}
json_object_object_add(a_json_out,"Public key size",json_object_new_uint64(a_sign->header.sign_pkey_size));
json_object_object_add(a_json_out,"Signature size",json_object_new_uint64(a_sign->header.sign_size));
json_object_object_add(a_json_out,"public_key_size",json_object_new_uint64(a_sign->header.sign_pkey_size));
json_object_object_add(a_json_out,"signature_size",json_object_new_uint64(a_sign->header.sign_size));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment