Skip to content

Commit

Permalink
mbedtls: select MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding
Browse files Browse the repository at this point in the history
Updates config to select the new MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY
option, which replaced the previously used
MBEDTLS_SSL_CID_PADDING_GRANULARITY. The old option is continuing to be
used as the new one exceeds the maximum length for an option name in
esp-idf.

See Mbed-TLS/mbedtls#4490 for more information.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
  • Loading branch information
hasheddan committed Sep 6, 2023
1 parent 62ee413 commit c531a18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions components/mbedtls/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,14 @@ menu "mbedTLS"
Maximum length of CIDs used for outgoing DTLS messages

config MBEDTLS_SSL_CID_PADDING_GRANULARITY
int "Record plaintext padding (for DTLS 1.2)"
int "Record plaintext padding"
default 16
range 0 32
depends on MBEDTLS_SSL_DTLS_CONNECTION_ID
select MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
help
Controls the use of record plaintext padding when
using the Connection ID extension in DTLS 1.2.
Controls the use of record plaintext padding in TLS 1.3 and
when using the Connection ID extension in DTLS 1.2.

The padding will always be chosen so that the length of the
padded plaintext is a multiple of the value of this option.
Expand Down
8 changes: 4 additions & 4 deletions components/mbedtls/port/include/mbedtls/esp_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2856,10 +2856,10 @@
#undef MBEDTLS_SSL_CID_OUT_LEN_MAX
#endif

/** \def MBEDTLS_SSL_CID_PADDING_GRANULARITY
/** \def MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
*
* This option controls the use of record plaintext padding
* when using the Connection ID extension in DTLS 1.2.
* in TLS 1.3 and when using the Connection ID extension in DTLS 1.2.
*
* The padding will always be chosen so that the length of the
* padded plaintext is a multiple of the value of this option.
Expand All @@ -2872,9 +2872,9 @@
*
*/
#ifdef CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID
#define MBEDTLS_SSL_CID_PADDING_GRANULARITY CONFIG_MBEDTLS_SSL_CID_PADDING_GRANULARITY
#define MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY CONFIG_MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
#else
#undef MBEDTLS_SSL_CID_PADDING_GRANULARITY
#undef MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
#endif


Expand Down

0 comments on commit c531a18

Please sign in to comment.