Re: CONFIG_MBEDTLS_BUILTIN vs CONFIG_MBEDTLS_LIBRARY


Linux Weekend Learning
 

I added this in my prj.conf file

CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y
CONFIG_MBEDTLS_USER_CONFIG_FILE="user-tls.conf"

user-tls.conf file:

#define MBEDTLS_X509_CRT_PARSE_C

In my code, i added a check to see whether this is enabled or not
#if defined(MBEDTLS_X509_CRT_PARSE_C)
LOG_INF("Enabled");
#endif

This log is not printing, what mistake i am doing. i need to set  MBEDTLS_X509_CRT_PARSE_C for certificate and private key to be accepted by socket_tls.c


On Mon, Mar 2, 2020 at 7:45 PM Bøe, Sebastian <Sebastian.Boe@...> wrote:
Hi,

I would recommend opening menuconfig and reading the help text for each option.

________________________________________
From: devel@... <devel@...> on behalf of Linux Weekend Learning via Lists.Zephyrproject.Org <md.jamalmohiuddin=gmail.com@...>
Sent: Monday, March 2, 2020 3:14 PM
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] CONFIG_MBEDTLS_BUILTIN vs CONFIG_MBEDTLS_LIBRARY

Hi All,

What is the difference between CONFIG_MBEDTLS_BUILTIN vs  CONFIG_MBEDTLS_LIBRARY

When i set  CONFIG_MBEDTLS_LIBRARY it is throwing error:

/home/jamal/zephyrproject/zephyr/subsys/net/lib/sockets/sockets_tls.c:24:10: fatal error: mbedtls/config.h: No such file or directory
 #include "mbedtls/config.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.

I want to set MBEDTLS_X509_CRT_PARSE_C, so that my certificate and private keys are parsed by the mbedtls library, can you please provide me steps to achieve this?

Join {devel@lists.zephyrproject.org to automatically receive all group messages.