TLS use too mush RAM

DevXXX
Posts: 1
Joined: Mon Jan 10, 2022 8:52 am

TLS use too mush RAM

Postby DevXXX » Mon Jan 10, 2022 6:08 pm

I'm using esp32-arduino with Visual Studio (Visual micro ext) and can't understand how it's possible to reduce memory usage with tls connection.

esp8266 sdk has option in WiFiClientSecure for MFLN: probeMaxFragmentLength for test and setBufferSizes. It's work great! We can use about 10Kb for establishing tls connection or less.

esp32 is using other lib for tls and it has not any abilities to set buffer size on the fly. Tried to set it from define:
#define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 2048
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH 2048
#define MBEDTLS_SSL_MAX_CONTENT_LEN 2048
#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 4096
but none of it works!
It's ridiculous - esp32 using 5-6 more ram for tls connection and can barely establish 1 tls connection when esp8266 having only ~40Kb of free ram can easily establish 2-3 connections (mqtt, https, etc)
Can somebody help?

Who is online

Users browsing this forum: No registered users and 118 guests