Skip to content
Snippets Groups Projects
Commit 01a4de72 authored by alexander.lysikov's avatar alexander.lysikov
Browse files

fixed trim token whitespace

parent 1ee48381
No related branches found
No related tags found
1 merge request!4Feature 2336
...@@ -103,13 +103,11 @@ size_t dap_chain_cert_parse_str_list(const char * a_certs_str, dap_chain_cert_t ...@@ -103,13 +103,11 @@ size_t dap_chain_cert_parse_str_list(const char * a_certs_str, dap_chain_cert_t
size_t l_certs_pos = 0; size_t l_certs_pos = 0;
size_t l_sign_total_size =0; size_t l_sign_total_size =0;
while(l_cert_str) { while(l_cert_str) {
// trim whitespace in certificate's name
// trim token whitespace l_cert_str = dap_strstrip(l_cert_str);// removes leading and trailing spaces
if(isspace(l_cert_str[0])) // get certificate by name
l_cert_str = l_cert_str + 1;
if(isspace(l_cert_str[strlen(l_cert_str) - 1]))
l_cert_str[strlen(l_cert_str) - 1] = 0;
l_certs[l_certs_pos] = dap_chain_cert_find_by_name(l_cert_str); l_certs[l_certs_pos] = dap_chain_cert_find_by_name(l_cert_str);
// if certificate is found
if(l_certs[l_certs_pos]) { if(l_certs[l_certs_pos]) {
l_sign_total_size += dap_chain_cert_sign_output_size(l_certs[l_certs_pos],0); l_sign_total_size += dap_chain_cert_sign_output_size(l_certs[l_certs_pos],0);
l_certs_pos++; l_certs_pos++;
......
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