Skip to content

Commit 4f67662

Browse files
committed
Merge branch 'feature/mbedtls-3.3.0' into 'master'
mbedtls: Update to v3.3.0 Closes IDF-6536 See merge request espressif/esp-idf!21897
2 parents c83d1db + 68d90dd commit 4f67662

File tree

7 files changed

+352
-100
lines changed

7 files changed

+352
-100
lines changed

components/mbedtls/Kconfig

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,26 @@ menu "mbedTLS"
179179
select MBEDTLS_HKDF_C
180180
default n
181181

182-
config MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
183-
bool "Enable TLS 1.3 middlebox compatibility mode"
182+
menu "TLS 1.3 related configurations"
184183
depends on MBEDTLS_SSL_PROTO_TLS1_3
185-
default y
184+
185+
config MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
186+
bool "TLS 1.3 middlebox compatibility mode"
187+
default y
188+
189+
config MBEDTLS_SSL_TLS1_3_KEXM_PSK
190+
bool "TLS 1.3 PSK key exchange mode"
191+
default y
192+
193+
config MBEDTLS_SSL_TLS1_3_KEXM_EPHEMERAL
194+
bool "TLS 1.3 ephemeral key exchange mode"
195+
default y
196+
197+
config MBEDTLS_SSL_TLS1_3_KEXM_PSK_EPHEMERAL
198+
bool "TLS 1.3 PSK ephemeral key exchange mode"
199+
default y
200+
201+
endmenu
186202

187203
config MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
188204
bool "Variable SSL buffer length"
@@ -212,6 +228,7 @@ menu "mbedTLS"
212228
config MBEDTLS_SSL_CONTEXT_SERIALIZATION
213229
bool "Enable serialization of the TLS context structures"
214230
default n
231+
depends on MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C
215232
help
216233
Enable serialization of the TLS context structures
217234
This is a local optimization in handling a single, potentially long-lived connection.
@@ -230,17 +247,14 @@ menu "mbedTLS"
230247
See mbedTLS documentation for required API and more details.
231248

232249
menu "DTLS-based configurations"
233-
visible if MBEDTLS_SSL_PROTO_DTLS
250+
depends on MBEDTLS_SSL_PROTO_DTLS
234251

235252
config MBEDTLS_SSL_DTLS_CONNECTION_ID
236253
bool "Support for the DTLS Connection ID extension"
237-
depends on MBEDTLS_SSL_PROTO_DTLS
238254
default n
239255
help
240256
Enable support for the DTLS Connection ID extension which allows to
241257
identify DTLS connections across changes in the underlying transport.
242-
The Connection ID extension is still in draft state.
243-
Refer: version draft-ietf-tls-dtls-connection-id-05
244258

245259
config MBEDTLS_SSL_CID_IN_LEN_MAX
246260
int "Maximum length of CIDs used for incoming DTLS messages"
@@ -276,7 +290,6 @@ menu "mbedTLS"
276290

277291
config MBEDTLS_SSL_DTLS_SRTP
278292
bool "Enable support for negotiation of DTLS-SRTP (RFC 5764)"
279-
depends on MBEDTLS_SSL_PROTO_DTLS
280293
default n
281294
help
282295
Enable support for negotiation of DTLS-SRTP (RFC 5764) through the use_srtp extension.
@@ -702,7 +715,7 @@ menu "mbedTLS"
702715
config MBEDTLS_SERVER_SSL_SESSION_TICKETS
703716
bool "TLS: Server Support for RFC 5077 SSL session tickets"
704717
default y
705-
depends on MBEDTLS_TLS_ENABLED
718+
depends on MBEDTLS_TLS_ENABLED && (MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C)
706719
help
707720
Server support for RFC 5077 session tickets. See mbedTLS documentation for more details.
708721
Disabling this option will save some code size.

components/mbedtls/mbedtls

Submodule mbedtls updated 458 files

components/mbedtls/port/dynamic/esp_ssl_cli.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
3535
if( ssl->state == MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC &&
3636
ssl->handshake->new_session_ticket != 0 )
3737
{
38-
ssl->state = MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET;
38+
ssl->state = MBEDTLS_SSL_NEW_SESSION_TICKET;
3939
}
4040
#endif
4141

@@ -158,7 +158,7 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
158158

159159

160160
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
161-
case MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET:
161+
case MBEDTLS_SSL_NEW_SESSION_TICKET:
162162
if (add) {
163163
CHECK_OK(esp_mbedtls_add_rx_buffer(ssl));
164164
} else {

components/mbedtls/port/dynamic/esp_ssl_tls.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void ssl_update_checksum_start( mbedtls_ssl_context *ssl,
4949
mbedtls_sha256_update( &ssl->handshake->fin_sha256, buf, len );
5050
#endif
5151
#if defined(MBEDTLS_SHA512_C)
52-
mbedtls_sha512_update( &ssl->handshake->fin_sha512, buf, len );
52+
mbedtls_sha512_update( &ssl->handshake->fin_sha384, buf, len );
5353
#endif
5454
}
5555

@@ -62,8 +62,8 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake )
6262
mbedtls_sha256_starts( &handshake->fin_sha256, 0 );
6363
#endif
6464
#if defined(MBEDTLS_SHA512_C)
65-
mbedtls_sha512_init( &handshake->fin_sha512 );
66-
mbedtls_sha512_starts( &handshake->fin_sha512, 1 );
65+
mbedtls_sha512_init( &handshake->fin_sha384 );
66+
mbedtls_sha512_starts( &handshake->fin_sha384, 1 );
6767
#endif
6868

6969
handshake->update_checksum = ssl_update_checksum_start;

0 commit comments

Comments
 (0)