8 years, 5 months ago.

How to use mBedtls library for secure communication between a client and server?

Dear All, I want to use mBedTLS library to develop a dtls client-server application for a secure packet communication between of NUCLEO Boards. I am using Online compiler and I am importing mBedTLS library available at github. Further, I am using the dtls_client.c and dtls_server.c files available in programs/ssl folder of the mBedTLS library. According to my understanding after successfully running the client.c or server.c application codes, online compiler will be generating binary files which I would be able to port on two NUCLEO boards to enable basic functionality of secure packet exchange between them.

However when I compile the dtls_server.c or dtls_client.c code I get the following errors:

- #error "Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in config.h". - #error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h"

When I disable the above error directives, I get the following error:

- Cannot open source input file "sys/types.h": No such file or directory "#include <sys/types.h>"

I have tried to change the board to FRDM_K64F and some other dtls library versions available from mbed.org in import wizard but couldn't solve those errors. So I wonder If I am going into the right direction to use online compiler to accomplish the above mentioned task or do I need to switch to Linux and use yotta build tools. Any help or comments in this context will be appreciated.

Be the first to answer this question.