Dear Community,

we are happily using mbedTLS on a STM32 with 512kB RAM. That system provides up to four active server services (webserver via 443 and three services via proprietary ports).
Since the first service needs a big MTU size, we are forced to set MBEDTLS_SSL_MAX_CONTENT_LEN to 16384, meaning using 16k input buffer and 16k output buffer for each of those connections.
The other three connections would work with 2 x 1,5kb each, but are effectively also consuming 2 x 16kb heap-RAM each, because of the global nature of the MBEDTLS_SSL_MAX_CONTENT_LEN setting.

Since mbedTLS is a ressource saving cryptographic library, I’d expect mbedTLS would eventually provide appropriate configuration-functions suitable for covering connection specific ressource demands.

Do you please see any way to achieve such goals with mbedTLS, even by using some kind of patch or such kind of solutions?

Thank you very much for your kind support and inspiration!