TCP Socket with TLS

Hello, 

has someone running a working example to open a TCP socket including TLS? Or what is the best base to start?

I am struggeling with the certs and key... is there somewhere a good description 

how i have to provide the certifcates and keys? I have seen examples where 

is quoted each line the certificate with " \n". I have also seen some ".DER" files which have to 

be converted to ".inc" files.... What is the correct way?

Thanks and best regards...

Parents
  • Hi Martin, 

    I was able to run TCP + TLS on my nrf7002 DK. 

    Let me try to answer your few questions. 

    1. You can refer some of the existing samples from zephyr/nordic documentation.

    2. I used .der certificate with following format. 

    3. In order to make TLS work, ensure the versions of zephyr sdk(my case it is ZEPHYR_SDK_VERSION 0.15.2). nerf-connect-sdk version: nrf-connect-sdk-v2.2.99-dev3. 

    4. Below mentioned HTTPS CLIENT sample is the best example for TCP+TLS. 

    5. Always take a little care to configurations.  

    Let me know if you struggle again with TLS. 

    Regards

    Vipin Das

Reply
  • Hi Martin, 

    I was able to run TCP + TLS on my nrf7002 DK. 

    Let me try to answer your few questions. 

    1. You can refer some of the existing samples from zephyr/nordic documentation.

    2. I used .der certificate with following format. 

    3. In order to make TLS work, ensure the versions of zephyr sdk(my case it is ZEPHYR_SDK_VERSION 0.15.2). nerf-connect-sdk version: nrf-connect-sdk-v2.2.99-dev3. 

    4. Below mentioned HTTPS CLIENT sample is the best example for TCP+TLS. 

    5. Always take a little care to configurations.  

    Let me know if you struggle again with TLS. 

    Regards

    Vipin Das

Children
  • Hi Vipin,

    Do you have any tutorial or sample to create TCP proxy and connect with remote server using server certificate created by CA root certificate.

    It will really helpful.