Chapter 2. API Reference
• External SPIRAM (MBEDTLS_EXTERNAL_MEM_ALLOC)
• Default alloc mode (MBEDTLS_DEFAULT_MEM_ALLOC)
• Custom alloc mode (MBEDTLS_CUSTOM_MEM_ALLOC)
• Internal IRAM (MBEDTLS_IRAM_8BIT_MEM_ALLOC)
Allows to use IRAM memory region as 8bit accessible region.
TLS input and output buffers will be allocated in IRAM section which is 32bit aligned mem-
ory. Every unaligned (8bit or 16bit) access will result in an exception and incur penalty of
certain clock cycles per unaligned read/write.
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN
TLS maximum message content length
Found in:
Component config
Maximum TLS message length (in bytes) supported by mbedTLS.
16384 is the default and this value is required to comply fully with TLS standards.
However you can set a lower value in order to save RAM. This is safe if the other end of the connection
supports Maximum Fragment Length Negotiation Extension (max_fragment_length, see RFC6066) or
you know for certain that it will never send a message longer than a certain number of bytes.
If the value is set too low, symptoms are a failed TLS handshake or a return value of
MBEDTLS_ERR_SSL_INVALID_RECORD (-0x7200).
Range:
• from 512 to 16384
Default value:
• 16384
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN
Asymmetric in/out fragment length
Found in:
Component config
If enabled, this option allows customizing TLS in/out fragment length in asymmetric way. Please note
that enabling this with default values saves 12KB of dynamic memory per TLS connection.
Default value:
• Yes (enabled)
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN
TLS maximum incoming fragment length
Found in:
Component config
This defines maximum incoming fragment length, overriding default maximum content length
(MBEDTLS_SSL_MAX_CONTENT_LEN).
Range:
• from 512 to 16384
Default value:
• 16384
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN
TLS maximum outgoing fragment length
Found in:
Component config
Espressif Systems
>
mbedTLS
>
mbedTLS
>
mbedTLS
>
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN
>
mbedTLS
>
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN
1185
Submit Document Feedback
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?