MQTTS Custom CERTs

Hi,

I have been working with the nrf7002DK, I have a situation:

I have properly implemented Wi-Fi STA and MQTT over TLS. I want to update few things and would need your support.

1. In nrf7002DK overlay.conf, the certificate credentials are automatically provisioned, but I would want to read the credentials from a different location.

2. I want to enable and disable the TLS support during run time, i.e, Is it possible to edit/configure the .conf file from the source.c file.

Kindly respond in the earliest.

Kind Regards,

Lalith RJ

Parents
  • Hi

    1. I assume you're referring to the wifi credentials here, right? The wifi credentials library have an option to use the PSA storage instead of the settings backend I believe is the default.

    2. In terms of sockets there shouldn't be an issue setting up both MQTT and MQTTS (with and without TLS). But the sample is somewhat static and you would need to implement this yourself if you want to enable/disable TLS in runtime. You can't change the .conf file itself but it's possible to enable and disable the TLS library and functions if you'd like.

    Best regards,

    Simon

  • Hi Simon,

    1. In nrf7002DK overlay.conf, the certificate credentials are automatically provisioned, but I would want to read the credentials from a different location.

    I meant the MQTTS certificates (ca certificate, client certificate and private certificate), I want to statically put the contents of the certs in the code instead of it automatically taking from a location.

    I want to do something like this,
    const char *certificateContent = "-----BEGIN CERTIFICATE-----\n" /**CONTENTS**/ "-----END CERTIFICATE-----";

    What I observe is, I have the certificate Contents stored in a memory(NVS) but in the sample the certificate is provisioned in the the mqtt_helper.c where I am not able to put my nvs contents!! I dont feel editing the library files.

    Do we have a way to do achieve what I need.

    Let me know if you have any doubts in the question and Kindly respond in the earliest.

    Kind Regards,

    Lalith RJ

Reply
  • Hi Simon,

    1. In nrf7002DK overlay.conf, the certificate credentials are automatically provisioned, but I would want to read the credentials from a different location.

    I meant the MQTTS certificates (ca certificate, client certificate and private certificate), I want to statically put the contents of the certs in the code instead of it automatically taking from a location.

    I want to do something like this,
    const char *certificateContent = "-----BEGIN CERTIFICATE-----\n" /**CONTENTS**/ "-----END CERTIFICATE-----";

    What I observe is, I have the certificate Contents stored in a memory(NVS) but in the sample the certificate is provisioned in the the mqtt_helper.c where I am not able to put my nvs contents!! I dont feel editing the library files.

    Do we have a way to do achieve what I need.

    Let me know if you have any doubts in the question and Kindly respond in the earliest.

    Kind Regards,

    Lalith RJ

Children
No Data
Related