crypto/openssl_mbedtls_wrapper: Fix compat with Mbed TLS 3.6.2 #3388
+8
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
crypto/openssl_mbedtls_wrapper: Fix compat with Mbed TLS 3.6.2
Summary
This updates the
openssl_mbedtls_wrapperto fix compilation errors and logic issues when building against Mbed TLS 3.6.2.Details
Mbed TLS 3.x introduced breaking changes, including hiding struct members and refactoring state machine enums. This patch adjusts the wrapper to accommodate these changes.
Changes
Allow Private Access:
-DMBEDTLS_ALLOW_PRIVATE_ACCESStoMakefile. The wrapper relies on direct struct access which is now private in Mbed TLS 3.x.Update State Machine Mappings (
ssl_pm.c):MBEDTLS_SSL_SERVER_NEW_SESSION_TICKETenum usage inssl_pm_get_state().Fix Error Codes & Versioning:
MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITEwithMBEDTLS_ERR_SSL_HANDSHAKE_FAILURE.ssl_pm_newto use correct version macros compatible with Mbed TLS 3.x.Testing