Skip to content

Commit 471ca6a

Browse files
committed
Merge branch 'contrib/github_pr_12177_v5.0' into 'release/v5.0'
mbedtls: define MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding (GitHub PR) (v5.0) See merge request espressif/esp-idf!28210
2 parents dfdbf4a + 3ef1cf7 commit 471ca6a

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

components/mbedtls/Kconfig

+16-16
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,22 @@ menu "mbedTLS"
252252
help
253253
Enable PKCS #7 core for using PKCS #7-formatted signatures.
254254

255+
config MBEDTLS_SSL_CID_PADDING_GRANULARITY
256+
int "Record plaintext padding"
257+
default 16
258+
range 0 32
259+
depends on MBEDTLS_SSL_PROTO_TLS1_3 || MBEDTLS_SSL_DTLS_CONNECTION_ID
260+
help
261+
Controls the use of record plaintext padding in TLS 1.3 and
262+
when using the Connection ID extension in DTLS 1.2.
263+
264+
The padding will always be chosen so that the length of the
265+
padded plaintext is a multiple of the value of this option.
266+
267+
Notes:
268+
A value of 1 means that no padding will be used for outgoing records.
269+
On systems lacking division instructions, a power of two should be preferred.
270+
255271
menu "DTLS-based configurations"
256272
depends on MBEDTLS_SSL_PROTO_DTLS
257273

@@ -278,22 +294,6 @@ menu "mbedTLS"
278294
help
279295
Maximum length of CIDs used for outgoing DTLS messages
280296

281-
config MBEDTLS_SSL_CID_PADDING_GRANULARITY
282-
int "Record plaintext padding (for DTLS 1.2)"
283-
default 16
284-
range 0 32
285-
depends on MBEDTLS_SSL_DTLS_CONNECTION_ID
286-
help
287-
Controls the use of record plaintext padding when
288-
using the Connection ID extension in DTLS 1.2.
289-
290-
The padding will always be chosen so that the length of the
291-
padded plaintext is a multiple of the value of this option.
292-
293-
Notes:
294-
A value of 1 means that no padding will be used for outgoing records.
295-
On systems lacking division instructions, a power of two should be preferred.
296-
297297
config MBEDTLS_SSL_DTLS_SRTP
298298
bool "Enable support for negotiation of DTLS-SRTP (RFC 5764)"
299299
default n

components/mbedtls/port/include/mbedtls/esp_config.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -2843,10 +2843,10 @@
28432843
#undef MBEDTLS_SSL_CID_OUT_LEN_MAX
28442844
#endif
28452845

2846-
/** \def MBEDTLS_SSL_CID_PADDING_GRANULARITY
2846+
/** \def MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
28472847
*
28482848
* This option controls the use of record plaintext padding
2849-
* when using the Connection ID extension in DTLS 1.2.
2849+
* in TLS 1.3 and when using the Connection ID extension in DTLS 1.2.
28502850
*
28512851
* The padding will always be chosen so that the length of the
28522852
* padded plaintext is a multiple of the value of this option.
@@ -2858,10 +2858,10 @@
28582858
* a power of two should be preferred.
28592859
*
28602860
*/
2861-
#ifdef CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID
2862-
#define MBEDTLS_SSL_CID_PADDING_GRANULARITY CONFIG_MBEDTLS_SSL_CID_PADDING_GRANULARITY
2861+
#ifdef CONFIG_MBEDTLS_SSL_CID_PADDING_GRANULARITY
2862+
#define MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY CONFIG_MBEDTLS_SSL_CID_PADDING_GRANULARITY
28632863
#else
2864-
#undef MBEDTLS_SSL_CID_PADDING_GRANULARITY
2864+
#undef MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
28652865
#endif
28662866

28672867

0 commit comments

Comments
 (0)