mbedtls CSR in ESP32

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: mbedtls CSR in ESP32

Postby ESP_Angus » Mon Oct 08, 2018 5:53 am

16aa00 wrote: Could you please be more specific how to increase to stack size of loopTask?
Find your arduino-esp32 directory. Open the subdirectory cores/esp32 and edit the file main.cpp

Change the value 8192 on this line to a larger number like 16384:
https://github.com/espressif/arduino-es ... in.cpp#L24

16aa00
Posts: 11
Joined: Tue Sep 04, 2018 12:03 pm

Re: mbedtls CSR in ESP32

Postby 16aa00 » Mon Oct 08, 2018 10:31 am

Hi ESP_Angus,

I changed the value of usStackDepth in xTaskCreatePinnedToCore() to 16384 but still I am getting the same error.
How to proceed now?

Thank You

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: mbedtls CSR in ESP32

Postby ESP_Angus » Mon Oct 08, 2018 11:15 pm

16aa00 wrote:Hi ESP_Angus,

I changed the value of usStackDepth in xTaskCreatePinnedToCore() to 16384 but still I am getting the same error.
How to proceed now?

Thank You
You can try an even larger number, but maybe a bug in the code is actually corrupting the stack somehow instead...

DannyBackx
Posts: 33
Joined: Wed Sep 19, 2018 7:17 pm

Re: mbedtls CSR in ESP32

Postby DannyBackx » Wed Dec 25, 2019 12:11 pm

I found this to be caused by the buffer allocation
int mbedtls_x509write_csr_pem( mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
int ret;
unsigned char output_buf[4096];
size_t olen = 0;
Changing this code to malloc and free that buffer avoids the problem.
I'm having trouble generating a valid CSR though that may not be esp32 related.

Danny

Who is online

Users browsing this forum: aygh4266 and 139 guests