Chapter 2. API Reference
This defines maximum outgoing fragment length, overriding default maximum content length
(MBEDTLS_SSL_MAX_CONTENT_LEN).
Range:
• from 512 to 16384
Default value:
• 4096
CONFIG_MBEDTLS_DYNAMIC_BUFFER
Using dynamic TX/RX buffer
Found in: Component config > mbedTLS
Using dynamic TX/RX buffer. After enabling this option, mbedTLS will allocate TX buffer when need
to send data and then free it if all data is sent, allocate RX buffer when need to receive data and then
free it when all data is used or read by upper layer.
By default, when SSL is initialized, mbedTLS also allocate TX and RX buffer with the default value
of “MBEDTLS_SSL_OUT_CONTENT_LEN”or “MBEDTLS_SSL_IN_CONTENT_LEN”, so
to save more heap, users can set the options to be an appropriate value.
Default value:
• No (disabled) if CONFIG_MBEDTLS_SSL_PROTO_DTLS
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT
Free SSL peer certificate after its usage
Found in: Component config > mbedTLS > CONFIG_MBEDTLS_DYNAMIC_BUFFER
Free peer certificate after its usage in handshake process.
Default value:
• No (disabled) if CONFIG_MBEDTLS_DYNAMIC_BUFFER
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
Free private key and DHM data after its usage
Found in: Component config > mbedTLS > CONFIG_MBEDTLS_DYNAMIC_BUFFER
Free private key and DHM data after its usage in handshake process.
The option will decrease heap cost when handshake, but also lead to problem:
Becasue all certificate, private key and DHM data are freed so users should register certificate and private
key to ssl config object again.
Default value:
• No (disabled) if CONFIG_MBEDTLS_DYNAMIC_BUFFER
CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT
Free SSL CA certificate after its usage
Found in: Component config > mbedTLS > CONFIG_MBEDTLS_DYNAMIC_BUFFER > CON-
FIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
Free CA certificate after its usage in the handshake process. This option will decrease the heap footprint
for the TLS handshake, but may lead to a problem: If the respective ssl object needs to perform the TLS
handshake again, the CA certificate should once again be registered to the ssl object.
Default value:
• Yes (enabled) if CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
Espressif Systems 1186
Submit Document Feedback
Release v4.4