Murata Type1LD Wifi module - Wiced studio 6.2 client certificate and client key doubt

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RAS_3434296
Level 1
Level 1
First like given

Hi Team ,

I am using Murata!LD wifi module for communicate to Azure server .Initiall I got the certificate data from following path

For Client certificate - apps/azure_iot_hub/client.cer

For Client Key          - 'apps/azure_iot_hub/privkey.cer

1)resource_get_readonly_buffer( &resources_apps_DIR_azure_iot_hub_DIR_client_cer, 0, MQTT_MAX_RESOURCE_SIZE, &size_out, (const void **) &security.cert );

2)resource_get_readonly_buffer( &resources_apps_DIR_azure_iot_hub_DIR_privkey_cer, 0, MQTT_MAX_RESOURCE_SIZE, &size_out, (const void **) &security.key );

Using above condition I can able to connect to azure server and able to send data also.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now I received the new certificate from UART like this I received and copied into some temp array .

client_cert_data[1200] and cert_length =1200.

client_key_data[1600] and key_length =1600.

Insted of using above 1) and 2)  method I plan to use following copy function .But I am not able to publish data please anyone give solution.

strncpy( security.cert,client_cert_data,cert_length );

security.cert_len = cert_length ;

strncpy( security.key,client_key_data,key_length );

security.key_len = key_length;

Thanks

Ravi S

0 Likes
1 Solution
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Please refer to snip.httpbin_org example where you should be able to see the root_ca certificate being initialized as a char array. The certificate syntax should be exactly similar to that for mbedTLS to parse that successfully.

If you are still facing some issue, I would recommend you to share the code example you are testing with; if confidential, drop the ce over personal message.

View solution in original post

1 Reply
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Please refer to snip.httpbin_org example where you should be able to see the root_ca certificate being initialized as a char array. The certificate syntax should be exactly similar to that for mbedTLS to parse that successfully.

If you are still facing some issue, I would recommend you to share the code example you are testing with; if confidential, drop the ce over personal message.